forked from rDrama/rDrama
fixed 500 error
parent
6ff420e338
commit
46c9c719d0
|
@ -215,9 +215,9 @@ def sanitize(sanitized, edit=False):
|
||||||
tag['alt'] = f'![]({tag["data-src"]})'
|
tag['alt'] = f'![]({tag["data-src"]})'
|
||||||
tag['referrerpolicy'] = "no-referrer"
|
tag['referrerpolicy'] = "no-referrer"
|
||||||
|
|
||||||
a = soup.new_tag("a", href=tag["data-src"], rel="nofollow noopener noreferrer")
|
a = soup.new_tag("a", href=tag["data-src"], rel="nofollow noopener noreferrer")
|
||||||
tag = tag.replace_with(a)
|
tag = tag.replace_with(a)
|
||||||
a.append(tag)
|
a.append(tag)
|
||||||
|
|
||||||
for tag in soup.find_all("a"):
|
for tag in soup.find_all("a"):
|
||||||
if tag.get("href") and fishylinks_regex.fullmatch(str(tag.string)):
|
if tag.get("href") and fishylinks_regex.fullmatch(str(tag.string)):
|
||||||
|
|
Loading…
Reference in New Issue