From 5de43c7941733584e756e76f96179efe6b9c1ecd Mon Sep 17 00:00:00 2001 From: vs Date: Tue, 22 Nov 2022 12:42:00 +0200 Subject: [PATCH] Fix parsing html with tag that has 'tag' attribute --- src/PHPHtmlParser/Dom/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPHtmlParser/Dom/Parser.php b/src/PHPHtmlParser/Dom/Parser.php index 7ed310cb..e8e54a0b 100644 --- a/src/PHPHtmlParser/Dom/Parser.php +++ b/src/PHPHtmlParser/Dom/Parser.php @@ -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('