diff options
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 038c739d5..5c0ca32af 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -294,8 +294,11 @@ class Linkinfo extends \Zotlabs\Web\Controller { if(empty($cp)) $cp = (preg_match('/meta.+content=["\']text\/html; charset=([^"\']+)/i', $body, $o) ? $o[1] : 'AUTO'); - $body = mb_convert_encoding($body, 'UTF-8', $cp); - $body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8"); + // mb_convert_encoding() is deprecated + //$body = mb_convert_encoding($body, 'UTF-8', $cp); + //$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8"); + + $body = mb_encode_numericentity($cp, [0x80, 0x10FFFF, 0, ~0], 'UTF-8'); $doc = new \DOMDocument(); @$doc->loadHTML($body); |