aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Linkinfo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-04 13:56:32 -0800
committerzotlabs <mike@macgirvin.com>2018-11-04 13:56:32 -0800
commit51b4b6216f902464f80b088666f3c91af0d3f333 (patch)
treefe770f4d5ddd3328c0f125541b95494e1e658bf4 /Zotlabs/Module/Linkinfo.php
parent3dab0d365d9fbc16eed7261ed3f68cf7f7f235c4 (diff)
downloadvolse-hubzilla-51b4b6216f902464f80b088666f3c91af0d3f333.tar.gz
volse-hubzilla-51b4b6216f902464f80b088666f3c91af0d3f333.tar.bz2
volse-hubzilla-51b4b6216f902464f80b088666f3c91af0d3f333.zip
z6 updates to owa, linkinfo improved image detection
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-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 a0ad17e68..dbed571d4 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -265,20 +265,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;
}
}