forked from MarseyWorld/MarseyWorld
dfsdfs
parent
940e47370e
commit
db0a8e0390
|
@ -83,12 +83,9 @@ allowed_styles =['color', 'font-weight', 'transform', '-webkit-transform']
|
|||
|
||||
def sanitize(sanitized, noimages=False):
|
||||
|
||||
print(sanitized)
|
||||
print('\n\n')
|
||||
sanitized = sanitized.replace("\ufeff", "").replace("m.youtube.com", "youtube.com")
|
||||
sanitized = re.sub("</blockquote>$", "</blockquote><pre></pre>", sanitized)
|
||||
sanitized = re.sub("^<blockquote>", "<pre></pre><blockquote>", sanitized)
|
||||
print(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")
|
||||
|
|
Loading…
Reference in New Issue