]> git.mxchange.org Git - friendica.git/commitdiff
Always parse the first title element
authorMichael Vogel <icarus@dabo.de>
Wed, 22 Jun 2016 19:00:58 +0000 (21:00 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 22 Jun 2016 19:00:58 +0000 (21:00 +0200)
mod/parse_url.php

index df5436b6261add605a703567f225906ea827a004..baf86775010a8360a7e09c451efc3f3ee3303905 100644 (file)
@@ -235,10 +235,9 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
                }
        }
 
-       //$list = $xpath->query("head/title");
        $list = $xpath->query("//title");
-       foreach ($list as $node)
-               $siteinfo["title"] =  html_entity_decode($node->nodeValue, ENT_QUOTES, "UTF-8");
+       if ($list->length > 0)
+               $siteinfo["title"] = $list->item(0)->nodeValue;
 
        //$list = $xpath->query("head/meta[@name]");
        $list = $xpath->query("//meta[@name]");