master
Aevann1 2021-09-01 23:19:59 +02:00
parent 8e3d92e5db
commit d813330265
1 changed files with 2 additions and 2 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 href="\2">\2</a>', sanitized)
sanitized = re.sub('<p>(https:\/\/[^ <>]*)', r'<p><a href="\1">\1</a>', sanitized)
sanitized = re.sub('([^">])(https:\/\/[^ <>]*)', r'\1<a target="_blank" href="\2">\2</a>', sanitized)
sanitized = re.sub('<p>(https:\/\/[^ <>]*)', r'<p><a target="_blank" href="\1">\1</a>', sanitized)
return sanitized