This commit is contained in:
Aevann1 2022-01-29 05:55:27 +02:00
parent e9a547fc18
commit 79c13530d2
3 changed files with 6 additions and 3 deletions

View file

@ -164,7 +164,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
for tag in soup.find_all("a"):
if tag.get("href"):
if not tag["href"].startswith(SITE_FULL) and not tag["href"].startswith('/'):
if not tag["href"].startswith(SITE_FULL) and not tag["href"].startswith('/') and not tag["href"].startswith(SITE_FULL2):
tag["target"] = "_blank"
tag["rel"] = "nofollow noopener noreferrer"