sdfsdf
This commit is contained in:
parent
f65e863d25
commit
db4b48ff28
1 changed files with 4 additions and 3 deletions
|
@ -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"
|
if site not in tag["src"] and not tag["src"].startswith('/'): tag["rel"] = "nofollow noopener noreferrer"
|
||||||
tag["class"] = "in-comment-image"
|
tag["class"] = "in-comment-image"
|
||||||
tag["loading"] = "lazy"
|
tag["loading"] = "lazy"
|
||||||
tag["data-src"] = tag["src"]
|
# tag["data-src"] = tag["src"]
|
||||||
tag["src"] = "/assets/images/loading.webp"
|
# tag["src"] = "/assets/images/loading.webp"
|
||||||
|
|
||||||
link = soup.new_tag("a")
|
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"
|
if site not in link["href"] and not link["href"].startswith('/'): link["rel"] = "nofollow noopener noreferrer"
|
||||||
link["target"] = "_blank"
|
link["target"] = "_blank"
|
||||||
link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
|
link["onclick"] = f"expandDesktopImage('{tag['data-src']}');"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue