forked from MarseyWorld/MarseyWorld
fdfd
parent
fb72076c08
commit
f889046620
|
@ -240,10 +240,8 @@ 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("se(x)", r"fuck\1", sanitized)
|
||||
# for i in re.finditer('[^">](https:\/\/[^ <>]*)', sanitized):
|
||||
# sanitized = sanitized.replace(i.group(1), f'<a href="{i.group(1)}">{i.group(1)}</a>')
|
||||
|
||||
sanitized = re.sub('([^">])(https:\/\/[^ <>]*)', r'\1<a href="\2">\2</a>', sanitized):
|
||||
|
||||
# for i in re.finditer('<p>(https:\/\/[^ <>]*)', sanitized):
|
||||
# sanitized = sanitized.replace(i.group(1), f'<a href="{i.group(1)}">{i.group(1)}</a>')
|
||||
|
|
Loading…
Reference in New Issue