master
Aevann1 2021-09-01 22:58:53 +02:00
parent 3beea0a019
commit 9e443e37e5
1 changed files with 3 additions and 0 deletions

View File

@ -244,4 +244,7 @@ def sanitize(sanitized, noimages=False):
for i in re.finditer('[^">](https:\/\/[^ ]*)', sanitized):
sanitized = sanitized.replace(i.group(1), f"<a href={i.group(1)} {i.group(1)}</a>")
for i in re.finditer('<p>(https:\/\/[^ ]*)', sanitized):
sanitized = sanitized.replace(i.group(1), f"<a href={i.group(1)} {i.group(1)}</a>")
return sanitized