We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c46c36c + c1bac0e commit cf47e8bCopy full SHA for cf47e8b
htmlparser.js
@@ -109,10 +109,8 @@
109
}
110
111
} else {
112
- html = html.replace(new RegExp("(.*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
113
- text = text.replace(/<!--(.*?)-->/g, "$1")
114
- .replace(/<!\[CDATA\[(.*?)]]>/g, "$1");
115
-
+ html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
+ text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
116
if (handler.chars)
117
handler.chars(text);
118
0 commit comments