fix: decode single quotes in html attributes (#9341)

This commit is contained in:
bughit 2019-02-04 16:48:24 -05:00 committed by Evan You
parent 1922e7d4d9
commit c27fe24dc6

View File

@ -36,10 +36,11 @@ const decodingMap = {
'"': '"', '"': '"',
'&': '&', '&': '&',
'
': '\n', '
': '\n',
'	': '\t' '	': '\t',
''': "'"
} }
const encodedAttr = /&(?:lt|gt|quot|amp);/g const encodedAttr = /&(?:lt|gt|quot|amp|#39);/g
const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g
// #5992 // #5992
const isIgnoreNewlineTag = makeMap('pre,textarea', true) const isIgnoreNewlineTag = makeMap('pre,textarea', true)