You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/07/25 00:35:48 UTC

[jira] [Closed] (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 ]

Howard M. Lewis Ship closed TAP5-1449.
--------------------------------------

    Resolution: Invalid

Never heard back on the suggested work around. Please re-open if still an issue.
                
> 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
>            Assignee: Howard M. Lewis Ship
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira