[web-devel] A string escape issue with Yesod Julius
Greg Weber
greg at gregweber.info
Wed Nov 14 16:14:39 CET 2012
Your question would be better answered on the yesod (google group) mail
list.
Julius is fairly dumb about interpolation as you point out. Eventually we
would like to make all insertions be JSON values.
On Wed, Nov 14, 2012 at 2:08 AM, Dmitry Vyal <akamaus at gmail.com> wrote:
> Greetings
>
> Recently I stumbled upon an unexpected escaping problem. I hoped
> Shakespeare templates would solve these forever, but looks like it's not
> the case.
>
> For example, look at this snippet:
> Prelude Text.Julius Data.Text.Lazy Data.Text> let t = "X\"Y\"Z"; j =
> [julius| str = "a#{t}bc"; |] in putStrLn $ Data.Text.Lazy.unpack $
> renderJavascriptUrl (\u env -> Data.Text.pack "") j
> str = "aX"Y"Zbc";
>
> Clearly we have have a problem here. Can something be done with it?
>
> Best wishes,
> Dmitry
>
> ______________________________**_________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/**mailman/listinfo/web-devel<http://www.haskell.org/mailman/listinfo/web-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20121114/1a90a523/attachment.htm>
More information about the web-devel
mailing list