Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
If you add multiple parameters in a HST URL tag like the following example, then it escapes '&' to '& a m p ;', by default.
<pre><xmp>
RENDER URL: <hst:renderURL><hst:param name="a" value="one"/><hst:param name="b" value="two"/></hst:renderURL>
RESOURCE URL: <hst:resourceURL><hst:param name="a" value="one"/><hst:param name="b" value="two"/></hst:resourceURL>
COMPONENT RENDERING URL: <hst:componentRenderingURL><hst:param name="a" value="one"/><hst:param name="b" value="two"/></hst:componentRenderingURL>
ACTION URL: <hst:actionURL><hst:param name="a" value="one"/><hst:param name="b" value="two"/></hst:actionURL>
LINK URL: <hst:link path="/news"><hst:param name="a" value="one"/><hst:param name="b" value="two"/></hst:link>
</xmp></pre>
==> (The above can generate something like this):
<hr/>
<pre><xmp>
RENDER URL: /site/news;jsessionid=E7161C783A9A444E685A8F20C385CB58?r54_r1_r1:page=2& a m p ;r54_r3:b=two& a m p ;r54_r3:a=one
RESOURCE URL: /site/_hn:resource%7Cr54_r3%7C/news;jsessionid=E7161C783A9A444E685A8F20C385CB58?r54_r1_r1:page=2& a m p ;r54_r3:b=two& a m p;r54_r3:a=one
COMPONENT RENDERING URL: /site/_hn:component-rendering%7Cr54_r3/news;jsessionid=E7161C783A9A444E685A8F20C385CB58?r54_r1_r1:page=2& a m p ;r54_r3:b=two&a m p ;r54_r3:a=one
ACTION URL: /site/_hn:action%7Cr54_r3%7C/news;jsessionid=E7161C783A9A444E685A8F20C385CB58?r54_r1_r1:page=2& a m p ;r54_r3:b=two& a m p ;r54_r3:a=one
LINK URL: /site/news?b=two&a=one</xmp></pre>
This default behavior (escaping the URL) is OK if the generated string is used in an html tag attribute (e.g, in href, src or action attribute).
However, if it is used in a Javascript block like the following example [1], then the escaped string can lead to an invalid URL request:
function <hst:namespace/>refreshDateTime()
{ simpleio_sendrequest("<hst:resourceURL/>", <hst:namespace/>mycb, null); }Therefore, we need to consistently expose 'escapeXml' attribute in the tag libraries.
Attachments
Issue Links
- is awaited by
-
HSTTWO-1831 actionURL is hard for infra to support in combination with https filter and proxies
- Closed