forked from rDrama/rDrama
fggf
parent
8493e4b54c
commit
05d2dcf992
|
@ -215,6 +215,6 @@ def sanitize(text, linkgen=False, flair=False):
|
||||||
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.*)</p>', sanitized):
|
||||||
sanitized = sanitized.replace(i.group(), f"<a href={i.group(1)}>{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