Skip to content

Commit aace72c

Browse files
author
Vladislav Bezverkhiy
committed
Updated comment tags parsing
1 parent 0b6d881 commit aace72c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PHPHtmlParser/Dom.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class Dom
8888
'base',
8989
'embed',
9090
'spacer',
91+
'!--'
9192
];
9293

9394
/**
@@ -506,7 +507,7 @@ protected function parseTag()
506507

507508
// attributes
508509
while ($this->content->char() != '>' &&
509-
$this->content->char() != '/') {
510+
$this->content->char() != '/' && $tag !== '!--') {
510511
$space = $this->content->skipByToken('blank', true);
511512
if (empty($space)) {
512513
$this->content->fastForward(1);

0 commit comments

Comments
 (0)