[
https://issues.apache.org/jira/browse/WICKET-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532985
]
Nathan Hamblen commented on WICKET-1047:
----------------------------------------
This is similar to WICKET-559, which was fixed by removing the escaping from
the superclass. Here I'm not sure that's desirable, since some user inputs may
not already be escaped. Ampersands could be replaced by regex only if they
aren't already escaped, though in some cases double escaping might be the
correct behavior (if an ampersand appears within a query value?).
Some clarification is needed (in the method documentation for urlFor and
getUrl) as to where escaping is expected and if inputs and outputs are escaped.
> Amersand escaped twice for ResourceLink href
> --------------------------------------------
>
> Key: WICKET-1047
> URL: https://issues.apache.org/jira/browse/WICKET-1047
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta2, 1.3.0-beta3
> Reporter: Nathan Hamblen
>
> When passing a ValueMap with multiple parameters to ResourceLink, the
> ampersand for the second and any higher parameters is escaped twice. For
> example:
> ResourceLink("link", new ResourceReference("largePressImage"), new
> ValueMap("id=20,idx=0"))
> yields an href of
> ../../resources/org.apache.wicket.Application/largePressImage?idx=0&id=20
> (this will not decode)
> Internally, ResourceLink calls getRequestCycle().urlFor(resourceReference,
> resourceParameters) at line 126 which gives an escaped URL. Then its Link
> superclass escapes the ampersand a second time at line 423.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.