This commit is contained in:
Aevann1 2022-04-18 01:00:17 +02:00
parent 0ff37f739f
commit 85cf3a092a
3 changed files with 5 additions and 5 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})\/|\/images\/)).*?)\)', 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)