Skip to content

Commit

Permalink
Fix parsing html with tag that has 'tag' attribute, see paquettg#311
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelie-vndl committed Mar 29, 2023
1 parent 4e01a43 commit 2e8d50e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PHPHtmlParser/Dom/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function parse(Options $options, Content $content, int $size): AbstractNo
$root->setHtmlSpecialCharsDecode($options->isHtmlSpecialCharsDecode());
$activeNode = $root;
while ($activeNode !== null) {
if ($activeNode && $activeNode->tag->name() === 'script'
if ($activeNode && $activeNode->getTag()->name() === 'script'
&& $options->isCleanupInput() !== true
) {
$str = $content->copyUntil('</');
Expand Down

0 comments on commit 2e8d50e

Please sign in to comment.