From: Michael Date: Mon, 28 Aug 2023 20:24:20 +0000 (+0000) Subject: New function to replace blank characters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9066a6133c5d4c0a5f6a1a8425eb4685130acd45;p=friendica.git New function to replace blank characters --- diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php index 6d07de575c..add6281ec3 100644 --- a/src/Content/Smilies.php +++ b/src/Content/Smilies.php @@ -294,7 +294,7 @@ class Smilies */ public static function isEmojiPost(string $body): bool { - $conv = html_entity_decode(str_replace([' ', "\n", "\r"], '', $body)); + $conv = html_entity_decode(preg_replace('#\s#', '', $body)); // Emojis are always 4 byte Unicode characters return (!empty($conv) && (strlen($conv) / mb_strlen($conv) == 4)); }