lk wrote:
I need to show the character "'" (′) inside an html:text tag.
The problem is that the tag html:text renders an html text field
substituting the escape sequence with the following sequence: ′
It seems that the amperseand is substituted with the sequence &.
Why?
To protect against 'special characters' in text fields breaking the
resulting HTML. '&' needs to be escaped to the browser doesn't try to
interpret it as the beginning of an entity reference.
The jstl core tag c:out has the attribute escapeXml="false". Is there
something similar for html:text/textarea?
No, it doesn't look like it, unfortunately. That doesn't prevent you form
outputting prime, just makes it a little harder. If the string containing
prime is already stored in a variable accessible in your page, no problem,
just reference the variable:
<html:text value="${varName}/>
If you want to be able to write '′' (or something equivalent)
literally in your JSP you'll have to get it into a variable first, then
reference it. For example (untested):
<c:set var="primeString" value="String containing ′"/>
<html:text value="${primeString}"/>
L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]