forked from rDrama/rDrama
disallow bounce cide repititive nesting
parent
11e15a0b24
commit
bbdd279772
|
@ -5508,6 +5508,10 @@ span > img[src$="/i/love-background.webp"] {
|
||||||
animation-timing-function: linear;
|
animation-timing-function: linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[cide] [cide], [bounce] [bounce] {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fix for <ol> being populated with <li><p></p></li> in many contexts. */
|
/* Fix for <ol> being populated with <li><p></p></li> in many contexts. */
|
||||||
.post-body li > p:first-child,
|
.post-body li > p:first-child,
|
||||||
.comment-text li > p:first-child,
|
.comment-text li > p:first-child,
|
||||||
|
|
|
@ -456,9 +456,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
||||||
|
|
||||||
soup = BeautifulSoup(sanitized, 'lxml')
|
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"):
|
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 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"]):
|
if not is_safe_url(tag["src"]):
|
||||||
|
|
Loading…
Reference in New Issue