aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-24 23:08:22 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-24 23:08:22 +0200
commitee804cd6b197457c2a51e2d37dbd1b03ca76917c (patch)
tree1174444a974f017fffbb1537357022e2e0688e38 /Zotlabs/Module
parent25c7e64ded56fcd8030cb898ba187be612c7b0f1 (diff)
parenta0a72a9f6d9e59ddf386a481e57dc64b882ff7ab (diff)
downloadvolse-hubzilla-ee804cd6b197457c2a51e2d37dbd1b03ca76917c.tar.gz
volse-hubzilla-ee804cd6b197457c2a51e2d37dbd1b03ca76917c.tar.bz2
volse-hubzilla-ee804cd6b197457c2a51e2d37dbd1b03ca76917c.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Linkinfo.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index f0d62b5e0..a0ad17e68 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -228,8 +228,8 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$header = $result['header'];
$body = $result['body'];
-
- $body = mb_convert_encoding($body, 'UTF-8', 'UTF-8');
+
+ $body = mb_convert_encoding($body, 'UTF-8', (preg_match('/meta.+content=["|\']text\/html;\s+charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8'));
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
$doc = new \DOMDocument();