Fix backslash escaping
This commit is contained in:
@@ -605,7 +605,7 @@ Handlebars.JavaScriptCompiler = function() {};
|
||||
|
||||
quotedString: function(str) {
|
||||
return '"' + str
|
||||
.replace(/\\/, '\\\\')
|
||||
.replace(/\\/g, '\\\\')
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/\n/g, '\\n')
|
||||
.replace(/\r/g, '\\r') + '"';
|
||||
|
||||
Reference in New Issue
Block a user