Java Mailing List Archive

Home » FreeMarker-user »

Re: [FreeMarker-user] ?js_string double escapes - is this wanted ?

Daniel Dekany


Replies: Find Java Web Hosting

Author LoginPost Reply
Friday, December 9, 2011, 5:35:29 PM, Daniel Dekany wrote:

> Friday, December 9, 2011, 3:56:55 PM, Grégory Joseph wrote:
>> Hi there,
>> Just noticed that ${"don't do this"?js_string?js_string} would
>> output "don\\'t do this". Shouldn't the built-in be smart enough to
>> notice when quotes are already escaped ? Or is there a good reason for this ?
> There is. Simply put, this is how it's correct. Like, it's possible
> that the text *literally* contains \', for with the JavaScript string
> literal syntax is \\'.

I meant \\\'.


Best regards,
Daniel Dekany

Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
FreeMarker-user mailing list
©2008 - Jax Systems, LLC, U.S.A.