aboutsummaryrefslogtreecommitdiffstats
path: root/include/html2bbcode.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 /include/html2bbcode.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 'include/html2bbcode.php')
-rw-r--r--include/html2bbcode.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index c928b91b1..aca3ff4f8 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -104,7 +104,11 @@ function html2bbcode($message)
$message = preg_replace('=<(\w+):(.+?)>=', '<removeme>', $message);
$message = preg_replace('=</(\w+):(.+?)>=', '</removeme>', $message);
- $message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
+ // mb_convert_encoding() is deprecated
+ //$message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
+ $message = mb_encode_numericentity($message, [0x80, 0x10FFFF, 0, ~0], 'UTF-8');
+
+
if(!$message)
return;