I display some text that may or may not contain html control characters ('<'
, '&', etc) - if it does contain them, I would like them to be converted to
their 'safe' representations, such as '<' so that they display and don't
alter the html . Is there a way to do this built into velocity? My initial
thought was to create my own tool and use something like Spring's
HtmlUtils.htmlEscape(...), but I don't want to re-invent the wheel if it is
already possible. As a side note, performance is critical; This method will
theoretically be called on text on our main search results page, which has a
huge number of hits daily, and I want to put as little additional strain on
our application servers as possible.
Any feedback is appreciated.
--
Peter Locke
Senior Engineer / Dev Lead
www.abebooks.com <http://www.abebooks.com/>