Skip to content

Commit 2ee6ef2

Browse files
defccyyx990803
authored andcommitted
replace special terminators chars (vuejs#3903)
1 parent 5300ef7 commit 2ee6ef2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/parser/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const bindRE = /^:|^v-bind:/
2222
const onRE = /^@|^v-on:/
2323
const argRE = /:(.*)$/
2424
const modifierRE = /\.[^\.]+/g
25+
const specialNewlineRE = /\u2028|\u2029/g
2526

2627
const decodeHTMLCached = cached(decodeHTML)
2728

@@ -223,6 +224,8 @@ export function parse (
223224
text
224225
})
225226
} else {
227+
// #3895 special character
228+
text = text.replace(specialNewlineRE, '')
226229
currentParent.children.push({
227230
type: 3,
228231
text

0 commit comments

Comments
 (0)