Merge pull request #2632 from annando/1606-parse-title

Always parse the first title element
This commit is contained in:
rabuzarus 2016-06-23 10:18:58 +02:00 committed by GitHub
commit 55205e344f

View 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]");