aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-10-23 19:57:21 +0200
committerMax Kostikov <max@kostikov.co>2018-10-23 19:57:21 +0200
commit3e6c2c60248051b17f96d98a54b8dcdd43bc7115 (patch)
tree55c1c0cb260cface1ab0ec8dc120f15d4edcf536 /Zotlabs
parentf180558041507bcc4f80e8f373ca3e6bd635edea (diff)
downloadvolse-hubzilla-3e6c2c60248051b17f96d98a54b8dcdd43bc7115.tar.gz
volse-hubzilla-3e6c2c60248051b17f96d98a54b8dcdd43bc7115.tar.bz2
volse-hubzilla-3e6c2c60248051b17f96d98a54b8dcdd43bc7115.zip
Update Linkinfo.php
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Linkinfo.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index 534e5697b..715cda356 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -228,10 +228,8 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$header = $result['header'];
$body = $result['body'];
-
- $x = preg_match('/<meta\s+http-equiv=.content-type.+; charset=([^"|\']+)/i', $body, $o);
-
- $body = mb_convert_encoding($body, 'UTF-8', ($o[1] ? $o[1] : 'UTF-8'));
+
+ $body = mb_convert_encoding($body, 'UTF-8', (preg_match('/<meta\s+http-equiv=.content-type.+; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8'));
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
$doc = new \DOMDocument();