From cc44c090082056df541c14c38a1c4cdd705b76af Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 21 Sep 2023 22:12:23 +0300 Subject: [PATCH] hopefully-unbreakable fix to the transform issue --- files/assets/css/main.css | 4 ---- files/helpers/sanitize.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 0228895e6b..91a93e624e 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -7745,10 +7745,6 @@ body { } } -p { /* fix the transform:exploit */ - overflow: hidden !important; -} - #sub-name { font-size: max(14px, 1.2vw); } diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index f5ecc46fc3..22cce58a62 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -645,6 +645,11 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis link["target"] = "_blank" link["rel"] = "nofollow noopener" + for child in link.findChildren(): + if 'transform' in child.get("style", "").lower(): + del link["href"] + break + sanitized = str(soup).replace('','').replace('','').replace('/>','>') captured = []