forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-11-06 20:10:08 +02:00
parent 2d8a671ba2
commit 58a998e7ec
1 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ def sanitize(sanitized, noimages=False):
if tag.get("src") and "pp20" not in tag.get("class", ""):
tag["rel"] = "nofollow noopener noreferrer"
if site not in tag["src"] and not tag["src"].startswith('/'): tag["rel"] = "nofollow noopener noreferrer"
tag["class"] = "in-comment-image"
tag["loading"] = "lazy"
tag["data-src"] = tag["src"]
@ -125,7 +125,7 @@ def sanitize(sanitized, noimages=False):
link = soup.new_tag("a")
link["href"] = tag["data-src"]
link["rel"] = "nofollow noopener noreferrer"
if tag.get("href") and site not in tag["href"] and not tag["href"].startswith('/'): link["rel"] = "nofollow noopener noreferrer"
link["target"] = "_blank"
link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
link["data-bs-toggle"] = "modal"