Skip to content

Commit 23aabcb

Browse files
committed
Fixed language detection to support parsing of HTML fragments
1 parent 7c7f502 commit 23aabcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mf2/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ public function language(DOMElement $el)
508508
return unicodeTrim($node->getAttribute('content'));
509509
}
510510
}
511-
} else {
511+
} elseif ($el->parentNode instanceof DOMElement) {
512512
// check the parent node
513513
return $this->language($el->parentNode);
514514
}

0 commit comments

Comments
 (0)