Escape and Unescape HTML characters using velocity

fdimaano's Avatar


19 Oct, 2010 09:23 PM

I'm not sure if there is a tool to escape or unescape HTML characters for the String in Velocity.

Currently, I need to just unescape HTML entities in a text such as this one:
<p/>This text is a paragraph</p>

so that it'll be:

This text is a paragraph


  1. 1 Posted by fdimaano on 19 Oct, 2010 09:29 PM

    fdimaano's Avatar

    hmmm.. the formatting didn't come through... need to convert:

    & l t ; p g t ; This is a paragraph & l t; / & g t ; 

    (placed spaces so it doesn't get converted to html... )


    <p>This is a paragraph</p>
  2. 2 Posted by Ross on 02 Mar, 2011 09:03 PM

    Ross's Avatar


    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 (


  3. Ross closed this discussion on 02 Mar, 2011 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac