maxmert/grunt-jstemplater — pull request #4 by samsullivan (2014-04-17 20:12:21+00:00)
Title: Replace \ with \\

I was using a regular expression with ParsleyJS and had the HTML:

I would receive an exception because the `\` was not escaped. I added `.replace(/\\/g, '\\\\')` to the replace chain on line 50. This escapes any `\` to `\\`. It needs to go before escaping `"`, so we do not end up with `\\"` (which evaluates to `\"` instead of `"`).