[
https://issues.apache.org/jira/browse/WICKET-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554954
]
Doug Leeper commented on WICKET-1149:
-------------------------------------
Ok...I found my issue. I had a customer WebRequestCodingStrategy that encoded
the resultant generated URL string which was causing a double encoding. I
removed this custom encoding strategy and everything worked fine.
However, I agree what you said that the & needs to be escaped to form proper
markup....but is the Localized ImageResource the place to do it? I would think
that the WebRequestCodingStrategy would be the place to "encode" the url before
placing in the stream. Unfortunately, I am not well versed in the entire
innards of Wicket to foresee any breakage...so I am assuming that RFE would
then need to be created to investigate this issue.
What do you think?
> LocalizedImageResource not formatting parameters properly when using
> ResourceReference
> --------------------------------------------------------------------------------------
>
> Key: WICKET-1149
> URL: https://issues.apache.org/jira/browse/WICKET-1149
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta4, 1.3.0-rc1
> Reporter: Doug Leeper
> Assignee: Matej Knopp
> Priority: Critical
>
> When using a ResourceReference, the resultant URL generated is not formatted
> properly when using more than one parameter.
> For example:
> Correct URL:
> http://localhost:8081/homeIQ/app/resources/homeiq.wicket.HomeIQApplication/modelPicture?thumbnail=true&maxHeight=100&maxWidth=100&id=1
> Incorrect URL: (generated by LocalizedResourceReference)
> http://localhost:8081/homeIQ/app/resources/homeiq.wicket.HomeIQApplication/modelPicture?thumbnail=true&maxHeight=100&maxWidth=100&id=1
> As can be seen, the & has been replaced with &. This is the result of
> the following code:
> tag.put("src",
> RequestCycle.get().getOriginalResponse().encodeURL(
> Strings.replaceAll(url, "&", "&")));
> It should be:
> tag.put("src",
> RequestCycle.get().getOriginalResponse().encodeURL(url);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.