You can do this.  Set up a chain of both references, and use regexp to
separate them.  (it's two different properties for the regexps).  Use
these properties for matching:

eventhandler.escape.html.match
eventhandler.escape.javascript.match

WILL



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]




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

Reply via email to