mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
avoid html decoding empty strings
This commit is contained in:
parent
fa46e8f88e
commit
9af0745779
@ -37,11 +37,10 @@ export function parse (html, preserveWhiteSpace) {
|
||||
currentParent = stack[stack.length - 1]
|
||||
},
|
||||
chars (text) {
|
||||
text = decodeHTML(text)
|
||||
text = currentParent.tag === 'pre'
|
||||
? text
|
||||
? decodeHTML(text)
|
||||
: text.trim()
|
||||
? text
|
||||
? decodeHTML(text)
|
||||
: preserveWhiteSpace
|
||||
? ' '
|
||||
: null
|
||||
|
Loading…
Reference in New Issue
Block a user