From: rabuzarus Date: Thu, 23 Jun 2016 08:18:58 +0000 (+0200) Subject: Merge pull request #2632 from annando/1606-parse-title X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=55205e344f8b5dd48fd56f12b2b3db928d57162d;hp=cd92a0dc34a8b5400311df0630d9933876f4d4db;p=friendica.git Merge pull request #2632 from annando/1606-parse-title Always parse the first title element --- diff --git a/mod/parse_url.php b/mod/parse_url.php index df5436b626..baf8677501 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -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]");