diff options
author | Mario <mario@mariovavti.com> | 2018-10-24 20:26:32 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-10-24 20:26:32 +0200 |
commit | a0a72a9f6d9e59ddf386a481e57dc64b882ff7ab (patch) | |
tree | be0112497b338f1ed8e113d29ada40d917c034a4 /Zotlabs | |
parent | 01e11e904391504417f1a47c4fbb6277c154b5fd (diff) | |
parent | 24d68a7f09d00540ed181498239b954afe042db0 (diff) | |
download | volse-hubzilla-a0a72a9f6d9e59ddf386a481e57dc64b882ff7ab.tar.gz volse-hubzilla-a0a72a9f6d9e59ddf386a481e57dc64b882ff7ab.tar.bz2 volse-hubzilla-a0a72a9f6d9e59ddf386a481e57dc64b882ff7ab.zip |
Merge branch 'patch-19' into 'dev'
Convert non UTF-8 content on link embeding
See merge request hubzilla/core!1347
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 4 |
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(); |