forked from MarseyWorld/MarseyWorld
yikes sweety
parent
aab7646c10
commit
61e7bf32df
|
@ -103,6 +103,7 @@ SLURS = {
|
|||
"elon musk": "rocket daddy",
|
||||
" elon ": " rocket daddy ",
|
||||
"fake and gay": "fake and straight",
|
||||
'<img loading="lazy" data-bs-toggle="tooltip" alt=":n:" title=":n:" class="emoji-md" src="/e/n.webp"> <img loading="lazy" data-bs-toggle="tooltip" alt=":i:" title=":i:" class="emoji-md" src="/e/i.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":g:" title=":g:" class="emoji-md" src="/e/g.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":g:" title=":g:" class="emoji-md" src="/e/g.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":e:" title=":e:" class="emoji-md" src="/e/e.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":r:" title=":r:" class="emoji-md" src="/e/r.webp">':'<img loading="lazy" data-bs-toggle="tooltip" alt=":b:" title=":b:" class="emoji-md" src="/e/b.webp"> <img loading="lazy" data-bs-toggle="tooltip" alt=":i:" title=":i:" class="emoji-md" src="/e/i.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":p:" title=":p:" class="emoji-md" src="/e/p.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":o:" title=":o:" class="emoji-md" src="/e/o.webp"><img loading="lazy" data-bs-toggle="tooltip" alt=":c:" title=":c:" class="emoji-md" src="/e/c.webp">'
|
||||
}
|
||||
|
||||
single_words = "|".join([slur.lower() for slur in SLURS.keys()])
|
||||
|
|
|
@ -236,7 +236,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
if remoji == 'marseyrandom': remoji = choice(marseys_const)
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{remoji}.webp'):
|
||||
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" class="{classes}" src="/e/{remoji}.webp" >', new, flags=re.I|re.A)
|
||||
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" class="{classes}" src="/e/{remoji}.webp">', new, flags=re.I|re.A)
|
||||
if comment: marseys_used.add(emoji)
|
||||
|
||||
sanitized = sanitized.replace(old, new)
|
||||
|
@ -326,7 +326,7 @@ def filter_emojis_only(title, edit=False, graceful=False):
|
|||
signal.signal(signal.SIGALRM, handler2)
|
||||
signal.alarm(1)
|
||||
|
||||
title = title.replace("<script","").replace("script>","").replace('<','<').replace('>','>').replace("&", "&").replace('"', '"').replace("'", "'").replace("\ufeff", "").replace("𒐪","").replace('','').replace("\n", "").replace("\r", "").replace("\t", "").strip()
|
||||
title = title.replace("<script","").replace("script>","").replace("&", "&").replace('<','<').replace('>','>').replace('"', '"').replace("'", "'").replace("\ufeff", "").replace("𒐪","").replace('','').replace("\n", "").replace("\r", "").replace("\t", "").strip()
|
||||
|
||||
title = bleach.clean(title, tags=[])
|
||||
|
||||
|
|
Loading…
Reference in New Issue