Change emoji shortcode validation to allow i18n non-ASCII characters
This commit is contained in:
parent
574cdad7a8
commit
5a586ec0c4
|
@ -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}):
|
||||
|
|
Loading…
Reference in New Issue