forked from MarseyWorld/MarseyWorld
master
parent
41309d0b63
commit
5a127ba9d1
|
@ -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/"]:
|
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 = sanitized.replace(rd, "https://old.reddit.com/")
|
||||||
|
|
||||||
sanitized = re.sub("sex", "fuck", sanitized)
|
sanitized = re.sub("se(x)", "fuck", sanitized)
|
||||||
# for i in re.finditer('[^">](https:\/\/[^ <>]*)', 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 = sanitized.replace(i.group(1), f'<a href="{i.group(1)}">{i.group(1)}</a>')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue