struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruimo Uno" <ruimo....@gmail.com>
Subject '&' is encoded even if the encode attribute of the url tag is set to false.
Date Tue, 28 Nov 2006 12:08:02 GMT
Hi,

If the url tag is used to generate an URL for the form tag:

<s:url id="postUrl" value="foobar.action" includeParams="all" encode="false"/>
<s:form action="%{#postUrl}">

The generated HTML form tag becomes as following:

<form ... action="/sample/foobar.action?user.email=mail&amp;amp;user.gender=MAIL&amp;amp;...

Sounds like the '&' is escaped twice. I think the following fix works fine:

--- UrlHelper.java (Line 171) ---
// buildParametersString(params, link);
if (encodeResult) {
    buildParametersString(params, link);
}
else {
    buildParametersString(params, link, "&");
}

Or is there any work around for this issue?

Thanks,

-- 
Ruimo Uno
(Shisei Hanai)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message