X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=library%2FHTML5%2FTreeBuilder.php;h=cdea5373f3363f601ce3e19afc2fdf3f31fae9e0;hb=146f386e37670b64c588c65d25c9f068a0e8e066;hp=2a789f4df962e9b39e05b72670fa5e37da3a5f0f;hpb=06c9330c5e0f5822cbd1695a50b01fb391a2984d;p=friendica.git diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php index 2a789f4df9..cdea5373f3 100644 --- a/library/HTML5/TreeBuilder.php +++ b/library/HTML5/TreeBuilder.php @@ -3039,7 +3039,11 @@ class HTML5_TreeBuilder { } private function insertElement($token, $append = true) { - $el = $this->dom->createElementNS(self::NS_HTML, $token['name']); + $el = $this->dom->createElementNS(self::NS_HTML, $token['name']); + if ($el == false) { + logger('insertElement(): ignoring invalid token='.$token['name']); + return false; + } if (!empty($token['attr'])) { foreach($token['attr'] as $attr) {