This commit is contained in:
Aevann1 2022-02-26 17:22:18 +02:00
parent 4c21e22426
commit 2128672378
4 changed files with 7 additions and 7 deletions

View file

@ -181,7 +181,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
tag["target"] = "_blank"
tag["rel"] = "nofollow noopener noreferrer"
if re.match("https?://\S+", str(tag.string), flags=re.A):
if re.fullmatch("https?://\S+", str(tag.string), flags=re.A):
try: tag.string = tag["href"]
except: tag.string = ""