Skip to content

Commit 20c78d6

Browse files
authored
Fixed issue with the loop when data-rocketjavascript="false" in use
1 parent 2fcda67 commit 20c78d6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Model/Controller/ResultPlugin.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ public function aroundRenderResult(
6565
$startTag = '<script';
6666
$endTag = '</script>';
6767

68-
while (false !== ($start = stripos($html, $startTag))) {
68+
$start = -1;
69+
$i = 0;
70+
while (false !== ($start = stripos($html, $startTag, $start + 1))) {
71+
$i++;
72+
if ($i > 1000 ) {
73+
return $result;
74+
}
75+
6976
$end = stripos($html, $endTag, $start);
7077
if (false === $end) {
7178
break;

0 commit comments

Comments
 (0)