BorisMoore/jsrender — Issue #20: Carriage return char not escaped in Internet Explorer
Author: kevb
Created: 2011-11-11 16:25:26+00:00
State: open

I had an issue where a carriage return character was finding its way into the parsed template and in Internet Explorer I'd get an error at line 545 complaining of an unterminated string which on inspection turned out to be a " followed by an unescaped \r.

My workaround was chnaging line 406 to the following:

content.push( markup.substr( loc, shift ).replace( rNewLine,"\\n").replace("\r", "\\n"));

Unfortunately I haven't had time to replicate this small-scale yet but I'm posting an issue in case it's something obvious that you can fix.