miracle2k/webassets — pull request #284 by danc86 (2013-12-24 01:20:41+00:00)
Title: JST filter does not correctly escape backslashes in string literals

If a template contains a backslash (for example, as part of a regexp on or anywhere else) the backslash is not escaped when the template is converted to a JavaScript string literal by the JST filter.

This patch uses json.dumps to produce JavaScript string literals rather than trying to do all the escaping correctly by hand.