Doesn't quite work that easily.
The problem is that if "#directive" is not an actual macro, than \#directive is shown verbatim. You only should escape when the same code is legit in both the source and the generated Velocity. This can be a little confusing.
Will
----- Original Message ----- From: "Mike Kienenberger" <[EMAIL PROTECTED]>
To: "Shinobu Kawai" <[EMAIL PROTECTED]>; "Velocity Users List" <velocity-user@jakarta.apache.org>
Cc: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Thursday, February 24, 2005 7:07 PM
Subject: Re: Escaping in VTL (was Re: Velocity JSP Generation)
Shinobu Kawai <[EMAIL PROTECTED]> wrote:> Escaping the VTL properly was a little challenging, but otherwise it > wasno> big deal.
I still don't "get" the whole escaping scheme, partly because I can't find any documentation that is completely correct. We might want a document totally devoted to escaping in VTL. :(
Escape all [$], [#], ["], [!] and [']. (actually, ! might be overkill, but
better safe than sorry.) Just use your tool :)
Always use formal notation ${x}
That's always worked for me, and never surprises me.
-Mike
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]