fix mentions in marquees

master
Aevann1 2022-06-27 07:14:45 +02:00
parent 41b7b1298e
commit e527dec36b
1 changed files with 2 additions and 2 deletions

View File

@ -4,11 +4,11 @@ from files.helpers.const import *
if SITE_NAME == 'PCM':
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|<p>)@(([a-zA-Z0-9_\-А-я]){3,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-А-я]){3,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
else:
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|<p>)@(([a-zA-Z0-9_\-]){1,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
valid_password_regex = re.compile("^.{8,100}$", flags=re.A)