[web-devel] A string escape issue with Yesod Julius

Dmitry Vyal akamaus at gmail.com
Wed Nov 14 11:08:26 CET 2012


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



More information about the web-devel mailing list