forked from rDrama/rDrama
master
parent
a7e7a446e0
commit
23461756e3
|
@ -214,7 +214,7 @@ def sanitize(text, linkgen=False, flair=False):
|
||||||
url_noquery = url.split('?')[0]
|
url_noquery = url.split('?')[0]
|
||||||
sanitized = sanitized.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
sanitized = sanitized.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
||||||
|
|
||||||
for i in re.finditer('<p>(https.*)</p>', sanitized):
|
for i in re.finditer('<p>(https.*)', sanitized):
|
||||||
sanitized = sanitized.replace(i.group(1), f"<a href={i.group(1)} target='_blank'>{i.group(1)}</p>")
|
sanitized = sanitized.replace(i.group(1), f"<a href={i.group(1)} target='_blank'>{i.group(1)}</p>")
|
||||||
|
|
||||||
return sanitized
|
return sanitized
|
Loading…
Reference in New Issue