From 8d539e6ff9a5a1e28d264ab2e502b2d868aab714 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 4 Oct 2023 13:33:07 +0300 Subject: [PATCH] fix this https://rdrama.net/post/208836/the-bird-of-the-day-is/5101413#context crashing phones --- files/helpers/sanitize.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 24457356d..ce83cd83a 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -688,6 +688,9 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis if sanitized.count("blur(") + sanitized.count("drop-shadow(") > 5: error("Too many filters!") + if sanitized.count("bounce") + sanitized.count("cide") > 5: + error("Too many 'bounce' and 'cide'!") + return sanitized.strip() def allowed_attributes_emojis(tag, name, value):