forked from MarseyWorld/MarseyWorld
master
parent
8d8563ea87
commit
26ffa2ea43
|
@ -95,7 +95,7 @@ allowed_styles = ['color', 'background-color', 'font-weight', 'transform', '-web
|
||||||
|
|
||||||
def sanitize(sanitized, noimages=False):
|
def sanitize(sanitized, noimages=False):
|
||||||
|
|
||||||
sanitized = sanitized.replace("\ufeff", "").replace("m.youtube.com", "youtube.com").replace("𒐪","")
|
sanitized = sanitized.replace("\ufeff", "").replace("𒐪","")
|
||||||
|
|
||||||
for i in re.finditer('https://i.imgur.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized):
|
for i in re.finditer('https://i.imgur.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized):
|
||||||
sanitized = sanitized.replace(i.group(1), i.group(2) + "_d." + i.group(3) + "?maxwidth=9999")
|
sanitized = sanitized.replace(i.group(1), i.group(2) + "_d." + i.group(3) + "?maxwidth=9999")
|
||||||
|
|
Loading…
Reference in New Issue