[stringtemplate-interest] html escaping
polina orechko
polina_o at hotmail.com
Thu Nov 3 19:14:47 PST 2005
Hello,
I am integrating StringTemplate as a template engine in a Struts-based web
app.
One of the questions I have is about HTML escaping, such as converting <, >,
quotes, etc. into their HTML entity equivalents such as < > etc..
As far as I can see from the source code, StringTemplate does not provide
such an option out of the box, is this understanding correct?
One way to do this would be to provide a String getter that would return an
encoded String, which quite cumbersome.
The second question is whether providing a render for String.class via
StringTemplate.registerRenderer looks like a better solution? Would it work
well? Are there any hidden caveats or problems that may surface?
Thanks in advance, any help would be greatly appreciated.
- Polina
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
More information about the stringtemplate-interest
mailing list