Skip to content

Commit 73fc21e

Browse files
WIP: filter out more libxml2 errors
1 parent 2ddb853 commit 73fc21e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HtmlParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function parseHtml( string $html ): DOMDocument {
4343

4444
$exception = null;
4545
foreach ( $errors as $error ) {
46-
if ( str_starts_with( $error->message, 'Tag template invalid' ) ) {
46+
if ( str_starts_with( $error->message, 'Tag ' ) && str_ends_with( $error->message, " invalid\n" ) ) {
4747
continue;
4848
}
4949
$exception = new Exception( $error->message, $error->code, $exception );

0 commit comments

Comments
 (0)