master
Aevann1 2021-09-02 00:38:12 +02:00
parent 871b38fc26
commit d3a15a8150
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ def sanitize(sanitized, noimages=False):
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
sanitized = sanitized.replace(rd, "https://old.reddit.com/")
sanitized = re.sub('([^">=])(https:\/\/[^ <>]*)', r'\1<a target="_blank" href="\2">\2</a>', sanitized)
sanitized = re.sub(' (https:\/\/[^ <>]*)', r' <a target="_blank" href="\1">\1</a>', sanitized)
sanitized = re.sub('<p>(https:\/\/[^ <>]*)', r'<p><a target="_blank" href="\1">\1</a>', sanitized)
return sanitized