From 72215411bb8773ba547d0b5842e978e1b9727e7a Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 9 Aug 2023 12:26:44 +0300 Subject: [PATCH] make it easier to detect golden, glow, party fraud --- files/helpers/sanitize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 6815383d4..b6cd9b992 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -487,7 +487,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis soup = BeautifulSoup(sanitized, 'lxml') for tag in soup.find_all("img"): - if tag.get("src") and not tag["src"].startswith('/pp/') and not 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"]): a = soup.new_tag("a", href=tag["src"], rel="nofollow noopener", target="_blank") a.string = tag["src"]