I would like to know how can i escape a # in velocity. Backslash seems to escape it but it prints itself as well
This:
\#\#
prints:
\#\#
I would like:
##
-
Maybe, the following site helps? http://velocity.apache.org/tools/releases/1.4/generic/EscapeTool.html
From Thomas -
Add the esc tool to your toolbox and then you can use ${esc.hash}
From Sergio del Amo -
If you don't want to bother with the EscapeTool, you can do this:
set( $H = '#' )
$H$H
From Nathan Bubna
0 comments:
Post a Comment