diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index 304805659..7d6a09108 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -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}):