This commit is contained in:
Aevann1 2022-04-18 00:47:30 +02:00
parent b70b8b5542
commit 0ff37f739f
2 changed files with 3 additions and 18 deletions

View file

@ -810,8 +810,8 @@ approved_embed_hosts = [
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)