You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <de...@velocity.apache.org> on 2018/06/26 01:02:00 UTC
[jira] [Resolved] (VELTOOLS-164) EscapeTool#url() does not escape
the '&' character
[ https://issues.apache.org/jira/browse/VELTOOLS-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson resolved VELTOOLS-164.
-------------------------------------
Resolution: Cannot Reproduce
Assignee: Claude Brisson
There isn't any {{EscapeTool.url(map)}} method, so I don't know which custom escape tool class you are referring to.
When using o.a.v.tools.generic.EscapeTool, your template code will call {{EscapeTool.url(map.toString())}}, aka EscapeTool.url("\{a=1, b=2}"), which produces:
%7Ba%3D1%2C+b%3D2%7D
as expected.
> EscapeTool#url() does not escape the '&' character
> --------------------------------------------------
>
> Key: VELTOOLS-164
> URL: https://issues.apache.org/jira/browse/VELTOOLS-164
> Project: Velocity Tools
> Issue Type: Bug
> Reporter: Guillaume Delhumeau
> Assignee: Claude Brisson
> Priority: Major
>
> Steps to reproduce:
> {code}
> ## 1: Create a map
> #set($urlParametersMap = {'a': '1', 'b': 2})
> ## 2: Display the escaped map
> $escapetool.url($urlParametersMap)
> {code}
> It returns:
> {code}
> ?a=1&b=2
> {code}
> Which is not correct according to my HTML5 validator.
> I would like to have:
> {code}
> ?a=1&b=2
> {code}
> Maybe it is not a bug but actually the intended behaviour, since I can still do:
> {code}
> $escapetool.xml($escapetool.url($urlParametersMap))
> {code}
> Thanks,
> Guillaume
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org