forked from MarseyWorld/MarseyWorld
sdfsdf
parent
62ce5d25bf
commit
ae6579ad2c
|
@ -130,11 +130,12 @@ def sanitize(sanitized, noimages=False):
|
|||
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"]
|
||||
tag["src"] = "/assets/images/loading.webp"
|
||||
# tag["data-src"] = tag["src"]
|
||||
# tag["src"] = "/assets/images/loading.webp"
|
||||
|
||||
link = soup.new_tag("a")
|
||||
link["href"] = tag["data-src"]
|
||||
# link["href"] = tag["data-src"]
|
||||
link["href"] = tag["src"]
|
||||
if site not in link["href"] and not link["href"].startswith('/'): link["rel"] = "nofollow noopener noreferrer"
|
||||
link["target"] = "_blank"
|
||||
link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
|
||||
|
|
Loading…
Reference in New Issue