summaryrefslogtreecommitdiff
path: root/internal/validate/formvalidation.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-02-20 11:46:04 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-20 11:46:04 +0100
commit65a273bc39bd2e278911d0787278e512f4013910 (patch)
tree2f42dc1f2d0d5d9bf4c147d39cd759f8c1a5df9d /internal/validate/formvalidation.go
parent[chore/frontend] Use different background color for block quotes (#2668) (diff)
downloadgotosocial-65a273bc39bd2e278911d0787278e512f4013910.tar.xz
[bugfix] use start + end line in regex when validating emoji via API (#2671)
Diffstat (limited to 'internal/validate/formvalidation.go')
-rw-r--r--internal/validate/formvalidation.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/validate/formvalidation.go b/internal/validate/formvalidation.go
index 1b5996b4b..3d1d05072 100644
--- a/internal/validate/formvalidation.go
+++ b/internal/validate/formvalidation.go
@@ -191,7 +191,7 @@ func CustomCSS(customCSS string) error {
// for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 2-30 characters,
// a-zA-Z, numbers, and underscores.
func EmojiShortcode(shortcode string) error {
- if !regexes.EmojiShortcode.MatchString(shortcode) {
+ if !regexes.EmojiValidator.MatchString(shortcode) {
return fmt.Errorf("shortcode %s did not pass validation, must be between 2 and 30 characters, letters, numbers, and underscores only", shortcode)
}
return nil