You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Geoff Callender (JIRA)" <ji...@apache.org> on 2011/02/19 05:43:38 UTC
[jira] Updated: (TAP5-1449) Percent (%) symbol in query parameter
is not being encoded
[ https://issues.apache.org/jira/browse/TAP5-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Geoff Callender updated TAP5-1449:
----------------------------------
Summary: Percent (%) symbol in query parameter is not being encoded (was: Percent (%) symbol in query parameters is not being encoded )
> Percent (%) symbol in query parameter is not being encoded
> -----------------------------------------------------------
>
> Key: TAP5-1449
> URL: https://issues.apache.org/jira/browse/TAP5-1449
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.1.0.5
> Reporter: Geoff Callender
>
> Eg. In an event handler method I create a Link, add a query parameter to it called "thing" with value "%ab", then return the link. The resulting URL is something like this:
> http://localhost/myapp/mypage?thing=%ab
> but it should be:
> http://localhost/myapp/mypage?thing=%25ab
> In mypage, when we do this:
> value = request.getParameter("thing");
> the value is null from the first URL, which is bad, and "%ab" from the second URL, which is good.
> So Tapestry is correctly decoding "%25" to "%", but it is not encoding "%" to "%25".
> For now, the workaround is to do this when adding the query parameter:
> link.addParameter("thing", value.replaceAll("%", "%25"));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira