master
Aevann1 2021-11-22 15:54:32 +02:00
parent 8d8563ea87
commit 26ffa2ea43
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ allowed_styles = ['color', 'background-color', 'font-weight', 'transform', '-web
def sanitize(sanitized, noimages=False): def sanitize(sanitized, noimages=False):
sanitized = sanitized.replace("\ufeff", "").replace("m.youtube.com", "youtube.com").replace("𒐪","") sanitized = sanitized.replace("\ufeff", "").replace("𒐪","")
for i in re.finditer('https://i.imgur.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized): for i in re.finditer('https://i.imgur.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized):
sanitized = sanitized.replace(i.group(1), i.group(2) + "_d." + i.group(3) + "?maxwidth=9999") sanitized = sanitized.replace(i.group(1), i.group(2) + "_d." + i.group(3) + "?maxwidth=9999")