diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 224723383..5130c90a9 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -4,7 +4,7 @@ from random import choice, choices valid_username_chars = 'a-zA-Z0-9_\-' valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A) -mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A) +mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,30})(?![^<]*<\/(code|pre|a)>)', flags=re.A) valid_password_regex = re.compile("^.{8,100}$", flags=re.A) @@ -40,7 +40,7 @@ sub_regex = re.compile('(^|\s|
)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)' strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}', flags=re.A) -mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,25}) ([0-9]+)", flags=re.A|re.I) +mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I) emoji_regex = re.compile(f"
\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A) emoji_regex2 = re.compile(f'(? + input { + text-transform: lowercase; + } + +