Skip to content

Commit b43a5b9

Browse files
stormsilveriamnoah
authored andcommitted
Fixed script tag regexes which were too greedy.
1 parent 2bc881e commit b43a5b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

writeCapture.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@
375375
return match[2] || match[3];
376376
};
377377
}
378-
379-
var SCRIPT_TAGS = /(<script[\s\S]*?>)([\s\S]*?)<\/script>/ig,
380-
SCRIPT_2 = /<script[\s\S]*?\/>/ig,
378+
379+
var SCRIPT_TAGS = /(<script[^>]*>)([\s\S]*?)<\/script>/ig,
380+
SCRIPT_2 = /<script[^>]*\/>/ig,
381381
SRC_REGEX = attrPattern('src'),
382382
SRC_ATTR = matchAttr('src'),
383383
TYPE_ATTR = matchAttr('type'),

0 commit comments

Comments
 (0)