Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 4de725e

Browse files
committed
Merge branch 'master' into develop
2 parents 5b75871 + ba5d15f commit 4de725e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DeferParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ protected function setOrRemoveAttribute($node, $attr, $value)
683683
protected function script_encode($html)
684684
{
685685
return preg_replace_callback('/(<script[^>]*>)(.*?)(<\/script>)/si', function ($matches) {
686-
if (!preg_match('/type=/i', $matches[1]) || strpos($matches[1], 'text/javascript') !== false) {
686+
if (!preg_match('/<\/[^>]*>/i', $matches[2]) && (!preg_match('/type=/i', $matches[1]) || strpos($matches[1], 'text/javascript') !== false)) {
687687
return $matches[0];
688688
}
689689

0 commit comments

Comments
 (0)