Hi, The escape tool does the job fine. However, it would be convenient that velocity future release could have a global configuration setting that escapes html by default whenever it outputs a variable value. Otherwise, you end up having to put $esc... everywhere.
Does this thought make sense? Thanks, Jian On Wed, 26 Jan 2005 09:34:03 +0900, Shinobu Kawai Yoshida <[EMAIL PROTECTED]> wrote: > Hi Andreas, > > > what's the best way to HTML-escape variables, preventing issues when I > > code $output and output in fact contains HTML tags (<b>hello world</b> > > should NOT be printed in bold but appear as it appears in this text)? > > > > In JSP ${output} and <c:out value="${output}"/> is automatically > > escaped; how can I handle this with Velocity? > > You can use the EscapeTool. :) > $esc.html($output) > http://wiki.apache.org/jakarta-velocity/EscapeTool > > Best regards, > -- Shinobu > > -- > Shinobu "Kawai" Yoshida <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- > 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]