Skip to content

Commit c27fe24

Browse files
bughityyx990803
authored andcommitted
fix: decode single quotes in html attributes (#9341)
1 parent 1922e7d commit c27fe24

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/compiler/parser/html-parser.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ const decodingMap = {
3636
'"': '"',
3737
'&': '&',
3838
'
': '\n',
39-
'	': '\t'
39+
'	': '\t',
40+
''': "'"
4041
}
41-
const encodedAttr = /&(?:lt|gt|quot|amp);/g
42-
const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g
42+
const encodedAttr = /&(?:lt|gt|quot|amp|#39);/g
43+
const encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g
4344

4445
// #5992
4546
const isIgnoreNewlineTag = makeMap('pre,textarea', true)

0 commit comments

Comments
 (0)