X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FParseUrl.php;h=e8b58806d987aa5d611f2aa78bbfd00efe0ded1e;hb=8f253f6c1288534c50fac34f05afb1a2c07c9335;hp=943725ffe0819df55c4e2055f3bc87c5aa8e6abb;hpb=86cae070f2a048e553c545caec54be72c1c14da5;p=friendica.git diff --git a/src/ParseUrl.php b/src/ParseUrl.php index 943725ffe0..e8b58806d9 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -9,6 +9,11 @@ namespace Friendica; use Friendica\Core\Config; +use xml; + +use DomXPath; +use DOMDocument; + require_once("include/network.php"); require_once("include/Photo.php"); require_once("include/oembed.php"); @@ -223,22 +228,22 @@ class ParseUrl { $body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8"); - $doc = new \DOMDocument(); + $doc = new DOMDocument(); @$doc->loadHTML($body); - \xml::deleteNode($doc, "style"); - \xml::deleteNode($doc, "script"); - \xml::deleteNode($doc, "option"); - \xml::deleteNode($doc, "h1"); - \xml::deleteNode($doc, "h2"); - \xml::deleteNode($doc, "h3"); - \xml::deleteNode($doc, "h4"); - \xml::deleteNode($doc, "h5"); - \xml::deleteNode($doc, "h6"); - \xml::deleteNode($doc, "ol"); - \xml::deleteNode($doc, "ul"); - - $xpath = new \DomXPath($doc); + xml::deleteNode($doc, "style"); + xml::deleteNode($doc, "script"); + xml::deleteNode($doc, "option"); + xml::deleteNode($doc, "h1"); + xml::deleteNode($doc, "h2"); + xml::deleteNode($doc, "h3"); + xml::deleteNode($doc, "h4"); + xml::deleteNode($doc, "h5"); + xml::deleteNode($doc, "h6"); + xml::deleteNode($doc, "ol"); + xml::deleteNode($doc, "ul"); + + $xpath = new DomXPath($doc); $list = $xpath->query("//meta[@content]"); foreach ($list as $node) {