From c27fe24dc6088b517ab17c799a1852f97c22c076 Mon Sep 17 00:00:00 2001 From: bughit Date: Mon, 4 Feb 2019 16:48:24 -0500 Subject: [PATCH] fix: decode single quotes in html attributes (#9341) --- src/compiler/parser/html-parser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser/html-parser.js b/src/compiler/parser/html-parser.js index d237f517775..3139721c366 100644 --- a/src/compiler/parser/html-parser.js +++ b/src/compiler/parser/html-parser.js @@ -36,10 +36,11 @@ const decodingMap = { '"': '"', '&': '&', ' ': '\n', - ' ': '\t' + ' ': '\t', + ''': "'" } -const encodedAttr = /&(?:lt|gt|quot|amp);/g -const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g +const encodedAttr = /&(?:lt|gt|quot|amp|#39);/g +const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g // #5992 const isIgnoreNewlineTag = makeMap('pre,textarea', true)