fix(compiler): prevent render of html code in paragraph, fixed #663

This commit is contained in:
qingwei.li 2018-10-31 22:05:24 +08:00
parent 4f588e0af4
commit d35059dd0b

View File

@ -261,6 +261,8 @@ export class Compiler {
result = helperTpl('tip', text)
} else if (/^\?>/.test(text)) {
result = helperTpl('warn', text)
} else if (/^</.test(text)) {
return text
} else {
result = `<p>${text}</p>`
}