aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-11-05 09:59:25 +0100
committerMario Vavti <mario@mariovavti.com>2018-11-05 09:59:25 +0100
commitb4b3e7b9a458675474b9dcb88de5396164048861 (patch)
treec8a1bf763b5f75290b773def8f4eec31aecafdf1
parent4830a1559d5ad9f59d809bf3d693592d3f7c8ab2 (diff)
downloadvolse-hubzilla-b4b3e7b9a458675474b9dcb88de5396164048861.tar.gz
volse-hubzilla-b4b3e7b9a458675474b9dcb88de5396164048861.tar.bz2
volse-hubzilla-b4b3e7b9a458675474b9dcb88de5396164048861.zip
update linkinfo from dev
-rw-r--r--Zotlabs/Module/Linkinfo.php37
1 files changed, 30 insertions, 7 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index 670967370..7c7dc0e88 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -270,20 +270,43 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
switch (strtolower($attr["name"])) {
- case 'generator':
- $siteinfo['generator'] = $attr['content'];
- break;
case "fulltitle":
- $siteinfo["title"] = $attr["content"];
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "description":
- $siteinfo["text"] = $attr["content"];
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "thumbnail":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:image":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:image:src":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:card":
+ if (($siteinfo["type"] == "") || ($attr["content"] == "photo")) {
+ $siteinfo["type"] = $attr["content"];
+ }
+ break;
+ case "twitter:description":
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "twitter:title":
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "dc.title":
- $siteinfo["title"] = $attr["content"];
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "dc.description":
- $siteinfo["text"] = $attr["content"];
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "keywords":
+ $keywords = explode(",", $attr["content"]);
+ break;
+ case "news_keywords":
+ $keywords = explode(",", $attr["content"]);
break;
}
}