From 9066a6133c5d4c0a5f6a1a8425eb4685130acd45 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 28 Aug 2023 20:24:20 +0000 Subject: [PATCH] New function to replace blank characters --- src/Content/Smilies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }