make it easier to detect golden, glow, party fraud

master
Aevann 2023-08-09 12:26:44 +03:00
parent c9aefc0169
commit 72215411bb
1 changed files with 1 additions and 1 deletions

View File

@ -487,7 +487,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
soup = BeautifulSoup(sanitized, 'lxml') soup = BeautifulSoup(sanitized, 'lxml')
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 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"]):
a = soup.new_tag("a", href=tag["src"], rel="nofollow noopener", target="_blank") a = soup.new_tag("a", href=tag["src"], rel="nofollow noopener", target="_blank")
a.string = tag["src"] a.string = tag["src"]