Convert non UTF-8 content on link embeding
This commit is contained in:
parent
01e11e9043
commit
f180558041
@ -228,8 +228,10 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$header = $result['header'];
|
$header = $result['header'];
|
||||||
$body = $result['body'];
|
$body = $result['body'];
|
||||||
|
|
||||||
$body = mb_convert_encoding($body, 'UTF-8', 'UTF-8');
|
$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, 'HTML-ENTITIES', "UTF-8");
|
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
|
||||||
|
|
||||||
$doc = new \DOMDocument();
|
$doc = new \DOMDocument();
|
||||||
|
Reference in New Issue
Block a user