You can also use the EscapeTool:

http://velocity.apache.org/tools/devel/generic/EscapeTool.html

On 2/28/07, Федор Дыдыкин <[EMAIL PROTECTED]> wrote:
Hi!

I need to escape special symbols (' and " for now) both in JavaScript and HTML 
in many of my already written templates.

Now i've found how to do it either in JavaScript or HTML using 
velocity.properties for velocity 1.5 beta2:

eventhandler.referenceinsertion.class = 
org.apache.velocity.app.event.implement.EscapeJavaScriptReference

or

eventhandler.referenceinsertion.class = 
org.apache.velocity.app.event.implement.EscapeHtmlReference

But how can i use both of these features? Different regexps for JavaScript and 
HTML velocity variables (how to do this if it is possible?)? Or is there any 
more simple solution?

Fedor

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to