Merge branch 'patch-19' into 'dev'

Convert non UTF-8 content on link embeding

See merge request hubzilla/core!1347
This commit is contained in:
Mario 2018-10-24 20:26:32 +02:00
commit a0a72a9f6d

View File

@ -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();