8000 This is a temporary fix - warning. · Nimbleworks/html5lib-php@2e00b0f · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e00b0f

Browse files
committed
This is a temporary fix - warning.
1 parent 10dc771 commit 2e00b0f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/HTML5/TreeBuilder.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3157,7 +3157,12 @@ public function emitToken($token, $mode = null) {
31573157
}
31583158

31593159
private function insertElement($token, $append = true) {
3160-
$el = $this->dom->createElementNS(self::NS_HTML, $token['name']);
3160+
//TODO: This is a hack.
3161+
try{
3162+
$el = $this->dom->createElementNS(self::NS_HTML, $token['name']);
3163+
}catch (Exception $e){
3164+
return;
3165+
}
31613166

31623167
if (!empty($token['attr'])) {
31633168
foreach($token['attr'] as $attr) {

0 commit comments

Comments
 (0)
0