Skip to content

Commit ed3eafb

Browse files
committed
Handle case with less than symbol in body
1 parent 4e01a43 commit ed3eafb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PHPHtmlParser/Dom/Parser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ private function parseTag(Options $options, Content $content, int $size): TagDTO
172172
// we are at the end of the file
173173
return TagDTO::makeFromPrimitives();
174174
}
175+
if ($content->char() == ' ') {
176+
$content->fastForward(1);
177+
return TagDTO::makeFromPrimitives(true);
178+
}
175179
if ($content->char() == '/') {
176180
return $this->makeEndTag($content, $options);
177181
}

0 commit comments

Comments
 (0)