[
https://issues.apache.org/struts/browse/WW-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41635
]
James Holmes commented on WW-1938:
----------------------------------
A quick note. When using the JSP EL, there is no issue with the ampersands. For
example, consider the following
<s:url id="testUrl" action="AssimilatorMySeekers" includeParams="none" >
<s:param name="foo" value="1"/>
<s:param name="bar" value="2"/>
<s:param name="baz" value="3"/>
</s:url>
<a href="<s:property value="%{testUrl}"/>">test 1</a><br>
<a href="${testUrl}">test 2</a><br>
<s:a href="%{testUrl}">test 3</s:a>
Only "test 1" in the example above has the issue. This is because the
<s:property/> tag escapes everything it is passed.
I'm going to commit a fix similar to the one that was implemented for WebWork.
I will add an escapeAmp attribute to the <s:url/> tag and have it default to
true.
> Bug with multiple s:param tags inside s:url tag
> ------------------------------------------------
>
> Key: WW-1938
> URL: https://issues.apache.org/struts/browse/WW-1938
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.6
> Reporter: Pavel Rodionov
> Assignee: James Holmes
> Fix For: 2.0.10
>
>
> <s:url id="urlFlash" action="viewFlash" includeParams="none" >
> <s:param name="blogid" value="%{blogId}"/>
> <s:param name="haaa" value="111"/>
> </s:url>
> Following construction generate strange url
> http://10.2.1.25:8081/CommentSystemWebApp/viewFlash.action?blogid=4&amp;haaa=111
> Look at "amp;amp;" it's like encoding ampersand '&'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.