Change emoji shortcode validation to allow i18n non-ASCII characters

This commit is contained in:
Jaidyn Ann 2024-03-14 21:51:45 -05:00
parent 574cdad7a8
commit 5a586ec0c4
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class CustomEmoji < ApplicationRecord
LIMIT = 256.kilobytes
SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}'
SHORTCODE_RE_FRAGMENT = '(([[:alnum:]])|_){2,}'
SCAN_RE = /(?<=[^[:alnum:]:]|\n|^)
:(#{SHORTCODE_RE_FRAGMENT}):