diff --git a/src/compiler/codegen.js b/src/compiler/codegen.js index e2873bc7..418b3a98 100644 --- a/src/compiler/codegen.js +++ b/src/compiler/codegen.js @@ -109,17 +109,13 @@ function genText (text) { } else { const exp = parseText(text) if (exp) { - return 'String(' + escapeNewlines(exp) + ')' + return 'String(' + exp + ')' } else { - return escapeNewlines(JSON.stringify(text)) + return JSON.stringify(text) } } } -function escapeNewlines (str) { - return str.replace(/\n/g, '\\n') -} - function getAttr (el, attr) { let val if (val = el.attrsMap[attr]) {