mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-03 04:33:17 -06:00
Merge branch 'main' into instance-custom-css
This commit is contained in:
commit
7cd9b0eae0
947 changed files with 689490 additions and 178161 deletions
|
|
@ -200,11 +200,11 @@ func InstanceCustomCSS(customCSS string) error {
|
|||
}
|
||||
|
||||
// EmojiShortcode just runs the given shortcode through the regular expression
|
||||
// for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 2-30 characters,
|
||||
// for emoji shortcodes, to figure out whether it's a valid shortcode, ie., 1-30 characters,
|
||||
// a-zA-Z, numbers, and underscores.
|
||||
func EmojiShortcode(shortcode string) error {
|
||||
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 fmt.Errorf("shortcode %s did not pass validation, must be between 1 and 30 characters, letters, numbers, and underscores only", shortcode)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue