tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/210-escape-and-unescape-html-characters-using-velocityCascade CMS: Discussion 2014-03-25T20:55:45Ztag:help-archives.hannonhill.com,2010-02-09:Comment/34178062010-10-19T21:23:17Z2010-10-19T21:23:17ZEscape and Unescape HTML characters using velocity<div><p>I'm not sure if there is a tool to escape or unescape HTML characters for the String in Velocity.</p>
<p>Currently, I need to just unescape HTML entities in a text such as this one:<br />
<p/>This text is a paragraph</p></p>
<p>so that it'll be:<br />
</p>
<p>This text is a paragraph</p>
<p>Thanks,<br />
Flordelis</p></div>fdimaanotag:help-archives.hannonhill.com,2010-02-09:Comment/34178062010-10-19T21:29:40Z2010-10-19T21:29:40ZEscape and Unescape HTML characters using velocity<div><p>hmmm.. the formatting didn't come through... need to convert:<br />
</p>
<pre>
& l t ; p g t ; This is a paragraph & l t; / & g t ;
</pre>
<p>(placed spaces so it doesn't get converted to html... )</p>
<p>into<br />
</p>
<pre>
<p>This is a paragraph</p>
</pre></div>fdimaanotag:help-archives.hannonhill.com,2010-02-09:Comment/34178062011-03-02T21:03:48Z2011-03-02T21:03:48ZEscape and Unescape HTML characters using velocity<div><p>Flordelis,</p>
<p>Not sure if this post is still relevant for you or if you've
found a workaround. I found it lost at the bottom of the pile
so-to-speak. There is a discussion about adding the needed Velocity
tools here: Include the generic Velocity tools in Cascade (<a href=
"http://uservoice.com/a/6Qhja">http://uservoice.com/a/6Qhja</a>)</p>
<p>Ross</p></div>Ross