Skip to content

Commit c46c36c

Browse files
committed
Merge pull request #2 from grassator/master
Fixed issue with parsing consecutive script or style tags.
2 parents 8835b74 + 7c98cbc commit c46c36c

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)