fdsfd
This commit is contained in:
parent
37c64f9fb8
commit
b70b8b5542
1 changed files with 4 additions and 4 deletions
|
@ -681,7 +681,7 @@ marsey_regex = re.compile("[a-z0-9]{1,30}", flags=re.A)
|
||||||
|
|
||||||
tags_regex = re.compile("[a-z0-9: ]{1,200}", flags=re.A)
|
tags_regex = re.compile("[a-z0-9: ]{1,200}", flags=re.A)
|
||||||
|
|
||||||
image_regex = re.compile("(^https:\/\/[\w\-.#&/=\?@%;+]{5,250}\.(png|jpg|jpeg|gif|webp|maxwidth=9999|fidelity=high)($|\s))", flags=re.I|re.M|re.A)
|
image_regex = re.compile("(^https:\/\/[\w\-.#&/=\?@%;+]{5,250}(\.png|\.jpg|\.jpeg|\.gif|\.webp|maxwidth=9999|fidelity=high)($|\s))", flags=re.I|re.M|re.A)
|
||||||
|
|
||||||
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,20}$", flags=re.A)
|
valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,20}$", flags=re.A)
|
||||||
|
|
||||||
|
@ -810,8 +810,8 @@ approved_embed_hosts = [
|
||||||
|
|
||||||
hosts = "|".join(approved_embed_hosts).replace('.','\.')
|
hosts = "|".join(approved_embed_hosts).replace('.','\.')
|
||||||
|
|
||||||
image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/([a-z0-9-]\.)*({hosts}))?\/).*?)\)', flags=re.A)
|
image_check_regex = re.compile(f'!\[\]\(((?!(https:\/\/([a-z0-9-]*\.)*({hosts}))?\/).*?)\)', flags=re.A)
|
||||||
|
|
||||||
embed_check_regex = regex.compile(f'(?<!<(code|pre|a)>)(https:\/\/([a-z0-9-]\.)*({hosts}))?\/[\w:~,()\-.#&\/=?@%;+]*', flags=regex.A)
|
embed_check_regex = regex.compile(f'(?<!<(code|pre|a)>)(https:\/\/([a-z0-9-]*\.)*({hosts}))?\/[\w:~,()\-.#&\/=?@%;+]*', flags=regex.A)
|
||||||
|
|
||||||
video_regex = regex.compile(f'((?<!<(code|pre|a)>)(https:\/\/([a-z0-9-]\.)*({hosts}))?\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=regex.A)
|
video_regex = regex.compile(f'((?<!<(code|pre|a)>)(https:\/\/([a-z0-9-]*\.)*({hosts}))?\/[\w:~,()\-.#&\/=?@%;+]*?\.(mp4|webm|mov))', flags=regex.A)
|
Loading…
Add table
Add a link
Reference in a new issue