Skip to content

Commit

Permalink
Merge pull request #4302 from ExpressionEngine/bug/7.x/validation-emo…
Browse files Browse the repository at this point in the history
…ji-replace

Resolved #4300 where url title validation failed with some emoji
  • Loading branch information
bryannielsen committed May 21, 2024
2 parents f6a9d75 + 23379bb commit 2b2b6ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function validate($key, $value)

protected function stripEmojis($value)
{
$regex = '/(?:' . ee('Emoji')->emojiRegex . ')/u';
$regex = '/(?:[' . ee('Emoji')->emojiRegex . '])/iu';
$value = preg_replace($regex, '', $value);

return $value;
Expand Down

0 comments on commit 2b2b6ee

Please sign in to comment.