aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Linkinfo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-14 17:23:57 +0000
committerMario <mario@mariovavti.com>2024-01-14 17:23:57 +0000
commitb05b756148e1a1f24deaadcb0a021e77839bba43 (patch)
treebc03f94f461eb6e10cfca059186030ff08655220 /Zotlabs/Module/Linkinfo.php
parent03819abb22cd8f3c72eaa2b39f424249434f392a (diff)
downloadvolse-hubzilla-b05b756148e1a1f24deaadcb0a021e77839bba43.tar.gz
volse-hubzilla-b05b756148e1a1f24deaadcb0a021e77839bba43.tar.bz2
volse-hubzilla-b05b756148e1a1f24deaadcb0a021e77839bba43.zip
Handling HTML entities via mbstring is deprecated
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-rw-r--r--Zotlabs/Module/Linkinfo.php7
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);