velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LS <alpha...@yahoo.com>
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
(http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg02560.html) 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>")
$href

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 velocity.properties
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.
http://careers.yahoo.com

--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message