From 37c9307fc41a9a6041e26d14394523477f795815 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 22 Jul 2023 13:10:27 +0300 Subject: [PATCH] better handling of large emojis in places where they're not allowed --- files/assets/css/main.css | 2 +- files/helpers/regex.py | 1 - files/helpers/sanitize.py | 7 ++++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index befba97d7..cdca743d2 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -5509,7 +5509,7 @@ input[type=radio] ~ .custom-control-label::before { height: 60px; width: 60px; } -.bigemoji, .emoji-lg, img[alt^=":"][alt*="#"] { +.bigemoji, .emoji-lg, img[alt^=":"][alt*="#"]:not([t]) { height: 150px; width: 150px; } diff --git a/files/helpers/regex.py b/files/helpers/regex.py index 02e965300..fc2766129 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -52,7 +52,6 @@ mute_regex = re.compile("\/mute @?([\w\-]{3,30}) ([0-9]+)", flags=re.A|re.I) emoji_regex = re.compile(f"

\s*(:[!#@\w\-]{{1,36}}:\s*)+<\/p>", flags=re.A) emoji_regex2 = re.compile(f'(?|[^`]*`))', flags=re.A) -emoji_regex3 = re.compile(f'(?(.+?)<\/a>', flags=re.A) snappy_youtube_regex = re.compile('