diff --git a/src/compiler.js b/src/compiler.js index 82618d31..e04a5b9d 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -124,7 +124,7 @@ var Compiler = Object.extend({ }, _templateName: function() { - return this.templateName == null? 'undefined' : '"'+this.templateName.replace(/"/g, '\\"')+'"'; + return this.templateName == null? 'undefined' : JSON.stringify(this.templateName); }, _bufferAppend: function(func) {