We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e5e02a commit 36fddbdCopy full SHA for 36fddbd
1 file changed
json/sanitizer.php
@@ -54,14 +54,18 @@ public static function decode(string $json) : array
54
55
/**
56
* Remove emoji from a string
57
+ * Basic emoji (U+1F300 to U+1F64F)
58
+ * Transport and map symbols (U+1F680 to U+1F6FF)
59
+ * Miscellaneous symbols and pictographs (U+1F300 to U+1F5FF)
60
+ * Additional emoji symbols (U+1F600 to U+1F64F)
61
*
62
* @param string $string
63
* @return string
64
*/
65
public static function strip_emoji(string $string) : string
66
{
67
return preg_replace(
- '/[\x{1F000}-\x{1F9FF}]|[\x{2600}-\x{27FF}]/u',
68
+ '/[\x{1F000}-\x{1F9FF}]|[\x{2600}-\x{27FF}]|[\x{1F300}-\x{1F64F}]|[\x{1F680}-\x{1F6FF}]/u',
69
'',
70
html_entity_decode($string, ENT_QUOTES, 'UTF-8')
71
);
0 commit comments