This issue was first raised by Andreas in bug #23319.
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23319)
I've brought it up to the expert group and it will, as mentioned
by Martin, require a change to the spec.
I've just added a comment to that bug stating that unfortunately the JSTL 1.1 Maintenance Release spec is now frozen,
and the fix will have to wait for the next release.
The change that the expert group has agreed on so far is to add one new attribute, 'escapeAmp', to escape the ampersand character. Default value will be false (to be backwards compatible).
HTH,
-- Pierre
Martin van Dijken wrote:
Hey Jeroen,
Sounds sensible, considering the fact that it is even a requirement of standard HTML 4.01. However, this is a modification of the spec I think. You might want to get in touch with them, or try the taglib-dev dept.
Grtz,
Martin van Dijken
-----Original Message----- From: Vianen, Jeroen van [mailto:[EMAIL PROTECTED] Sent: dinsdag 7 oktober 2003 11:25 To: '[EMAIL PROTECTED]' Subject: Feature request in <c:url>?
To be able to write correct XHTML &'s in the querystring need to be escaped.
To do so, I use the following code:
<c:set var="a" value="A"/>
<c:set var="b" value="B"/>
<c:url var="theUrl" value="whatever.jsp">
<c:param name="a" value="${a}"/>
<c:param name="b" value="${b}"/>
</c:url>
<a href="<c:out value="${theUrl}" escapeXml="true"/>">Link to whatever</a>
This will return a correctly XML / XHTML escaped URL:
<a href="whatever.jsp?a=A&b=B">...</a>
Would it be possible in a future version of the JSTL to combine these two
tags as follows:
<c:url value="whatever.jsp" escapeXml="true"> <c:param name="a" value="${a}"/> <c:param name="b" value="${b}"/> </c:url>
What do you think?
Jeroen
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
