Skip to content

Commit 010fba8

Browse files
committed
1 parent c14e4bb commit 010fba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function getHtmlContent()
183183
}
184184

185185
//Remove all script elements, CDATA sections and comments (thanks https://github.com/jasny)
186-
$response = preg_replace(['%<!--(?:[^-]++|-)*?-->|<!\[CDATA\[(?:[^\]]++|\])*?\]\]>%si', '%<script\b(?:"(?:[^"\\\\]++|\\\\.)*+"|\'(?:[^\'\\\\]++|\\\\.)*+\'|[^>"\']++)*>(?:[^<]++|<)*?</\s*script\s*>%si'], '', $response);
186+
//$response = preg_replace(['%<!--(?:[^-]++|-)*?-->|<!\[CDATA\[(?:[^\]]++|\])*?\]\]>%si', '%<script\b(?:"(?:[^"\\\\]++|\\\\.)*+"|\'(?:[^\'\\\\]++|\\\\.)*+\'|[^>"\']++)*>(?:[^<]++|<)*?</\s*script\s*>%si'], '', $response);
187187

188188
$this->htmlContent->loadHTML($response);
189189
libxml_use_internal_errors($errors);

0 commit comments

Comments
 (0)