velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LS <>
Subject escaped quotes in #set directive for string literals
Date Mon, 12 Nov 2001 18:51:53 GMT
Hi, I'm trying to figure out the best way to get quoted strings to work with #set.
I've checked the archives and found a thread on this back in July
( that
indicated that this issue was a point of contention.

To recap, I am trying to do something like this

#set ($href = "<a href="foo.m?bar=$schmoo">Hi</a>")

so that I would see the inner quotes in the final HTML output.

If I escape them with \, then the \'s end up in the final output, which is bad.

If I use single quotes on the outside and double quotes internally, then the single
quotes keep the contents from being parsed, unless I tweak the
file to disable this, which I'd rather not do.

If you have handled this in the past, how did you do it?

Do You Yahoo!?
Find a job, post your resume.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message