diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 4ef3b7442..8ba32540a 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -275,9 +275,9 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): if not noimages: for i in re.finditer('>(https://.*?\.(mp4|webm|mov|MP4|WEBM|MOV))
', sanitized): - sanitized = sanitized.replace(f'', f'') + sanitized = sanitized.replace(f'
', f'') for i in re.finditer('
(https:.*?\.(mp4|webm|mov|MP4|WEBM|MOV))
', sanitized): - sanitized = sanitized.replace(i.group(0), f'') + sanitized = sanitized.replace(i.group(0), f'
') for rd in ["://reddit.com", "://new.reddit.com", "://www.reddit.com", "://redd.it", "://libredd.it"]: sanitized = sanitized.replace(rd, "://old.reddit.com")