forked from rDrama/rDrama
1
0
Fork 0

disallow bounce cide repititive nesting

master
Aevann 2023-10-10 21:59:48 +03:00
parent 11e15a0b24
commit bbdd279772
2 changed files with 4 additions and 3 deletions

View File

@ -5508,6 +5508,10 @@ span > img[src$="/i/love-background.webp"] {
animation-timing-function: linear;
}
[cide] [cide], [bounce] [bounce] {
animation: none;
}
/* Fix for <ol> being populated with <li><p></p></li> in many contexts. */
.post-body li > p:first-child,
.comment-text li > p:first-child,

View File

@ -456,9 +456,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
soup = BeautifulSoup(sanitized, 'lxml')
if len(soup.select('[bounce], [cide]')) > 5:
error("Max 5 usages of 'bounce' and 'cide'!")
for tag in soup.find_all("img"):
if tag.get("src") and not tag["src"].startswith('/pp/') and not (snappy and tag["src"].startswith(f'{SITE_FULL_IMAGES}/e/')):
if not is_safe_url(tag["src"]):