velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Kumar" <HKu...@wyndham.com>
Subject RE: Escape a double quote "
Date Thu, 09 Sep 2004 18:09:50 GMT
Why not use single quotes around $imagePath ? I haven't tried it. But
you might want to check that out. 

Thanks
Hemanth

-----Original Message-----
From: Matt Higgins [mailto:mhiggins@bluesocket.com] 
Sent: Thursday, September 09, 2004 1:05 PM
To: velocity-user@jakarta.apache.org
Subject: Escape a double quote "

I have a macro that produces html and I need to escape a double quote
i.e. "

An example may be helpful 

#macro(showimage $imagePath)
	#set ($output = "<img class="foo" src="$imagePath">")
        <table>
	<tr><td>$output</td></tr>
	</table>
#end

I would like it to produce
<table>
<tr><td><img class="foo" src="/path/to/file.jpg"></td><tr> </table>

The above code obviously pukes, however I tried to escape the contained
quotes with \" but that did not output any quotes. I searched around the
site but could not find anything ? 

Any help with this would be appreciated. 

-Matt

		

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


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


Mime
View raw message