You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Hanasaki JiJi <ha...@hanaden.com> on 2003/03/10 23:34:52 UTC
JSTL c:out rewrites html tags
The JSTL taglibs (c:out) re-write html tags into > so the actual text
prints out. Is there any way to disable this?
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Shawn Bayern <ba...@essentially.net>.
On Mon, 10 Mar 2003, Hanasaki JiJi wrote:
> Great! the c:out inside the c:set just modifies the value but doesnt
> output it to the web page? right?
Right, exactly.
--
Shawn Bayern
"JSTL in Action" http://www.manning.com/bayern
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Hanasaki JiJi <ha...@hanaden.com>.
Great! the c:out inside the c:set just modifies the value but doesnt
output it to the web page? right?
Shawn Bayern wrote:
> On Mon, 10 Mar 2003, Hanasaki JiJi wrote:
>
>
>>Thanks to Brian and Shawn! anyone know of a lib that will perfrom the
>>escXML on a String?
>>
>>goal:
>> take in input string that may / maynot have HTML tags
>> zap the html tags or turn them to pure text ala <
>
>
> You can use <c:out> wrapped by <c:set> to do this, as in
>
> <c:set var="safeStringWithNoBrackets">
> <c:out value="${mayContainHtmlOrMayNot}" />
> </c:set>
> <%-- modify string --%>
> <c:out value="${safeStringWithNoBrackets}" escapeXml="false" />
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Shawn Bayern <ba...@essentially.net>.
On Mon, 10 Mar 2003, Hanasaki JiJi wrote:
> Thanks to Brian and Shawn! anyone know of a lib that will perfrom the
> escXML on a String?
>
> goal:
> take in input string that may / maynot have HTML tags
> zap the html tags or turn them to pure text ala <
You can use <c:out> wrapped by <c:set> to do this, as in
<c:set var="safeStringWithNoBrackets">
<c:out value="${mayContainHtmlOrMayNot}" />
</c:set>
<%-- modify string --%>
<c:out value="${safeStringWithNoBrackets}" escapeXml="false" />
--
Shawn Bayern
"JSTL in Action" http://www.manning.com/bayern
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Hanasaki JiJi <ha...@hanaden.com>.
Thanks to Brian and Shawn! anyone know of a lib that will perfrom the
escXML on a String?
goal:
take in input string that may / maynot have HTML tags
zap the html tags or turn them to pure text ala <
add some HTML tags
output via c:out escapeXml="false"
dont want any html to get used as html if it was in the original string.
customers enter it in a web browser window.
Brian Buckley wrote:
> Set the escapeXml attribute to false.
>
> <c:out value="${foo}" escapeXml="false" />
>
>
>>The JSTL taglibs (c:out) re-write html tags into > so the actual text
>>prints out. Is there any way to disable this?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Brian Buckley <br...@attbi.com>.
Set the escapeXml attribute to false.
<c:out value="${foo}" escapeXml="false" />
> The JSTL taglibs (c:out) re-write html tags into > so the actual text
> prints out. Is there any way to disable this?
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL c:out rewrites html tags
Posted by Shawn Bayern <ba...@essentially.net>.
On Mon, 10 Mar 2003, Hanasaki JiJi wrote:
> The JSTL taglibs (c:out) re-write html tags into > so the actual
> text prints out. Is there any way to disable this?
Yes, the escapeXml="false" attribute of the <c:out> tag disables this
behavior.
--
Shawn Bayern
"JSTL in Action" http://www.manning.com/bayern
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org