Skip to content

Commit 7c98cbc

Browse files
author
Dmitriy Kubyshkin
committed
Fixed issue with parsing consecutive script or style tags.
1 parent 8835b74 commit 7c98cbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htmlparser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
}
110110

111111
} else {
112-
html = html.replace(new RegExp("(.*)<\/" + stack.last() + "[^>]*>"), function (all, text) {
112+
html = html.replace(new RegExp("(.*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
113113
text = text.replace(/<!--(.*?)-->/g, "$1")
114114
.replace(/<!\[CDATA\[(.*?)]]>/g, "$1");
115115

0 commit comments

Comments
 (0)