X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FOEmbed.php;h=7afdfac35c35361e230fcb3b235a0c54eb21a300;hb=739b6d6533fb54b1d7e6a641242c0103d73c487e;hp=c113110662351f44d2328807cca1920d0d682c9d;hpb=23e1c0bb712c123219ba97d5fd0dd393fca52975;p=friendica.git diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index c113110662..7afdfac35c 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -334,8 +334,8 @@ class OEmbed $html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text)); // If it doesn't parse at all, just return the text. - $dom = @DOMDocument::loadHTML($html_text); - if (!$dom) { + $dom = new DOMDocument(); + if (!@$dom->loadHTML($html_text)) { return $text; } $xpath = new DOMXPath($dom);