velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Expression okay in 14. but not parsable in 1.7
Date Wed, 20 Jul 2011 15:19:54 GMT

I've found an expression that parser in Velocity 1.4 but does not in
Velocity 1.7:

#set($linkedExpression =

(That should be all on one line)

The parse error is:

org.apache.velocity.exception.ParseErrorException: Encountered "$link"
at mytemplate.vm[line 95, column 123]
Was expecting one of:
    "," ...
    ")" ...
    <WHITESPACE> ...

Column 123 is, as you might imagine, the only reference to $link above.
It looks like the \" is tripping-up the parser.

I seem to recall come discussion about escaped characters in
double-quoted strings a while ago. Did we decide that backslash woul no
longer escape a double-quote in a string? What's the recommended
technique for embedding double-quotes, now?

#set($quote = '"')
#set($foo = "quoted $quote thing")


#set($foo = "quoted $esc.q thing")

or something else?


View raw message