From 2ae7e714707f14b021fe1399a24b5e14ea0ef2d5 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 6 Apr 2024 08:49:59 +0200 Subject: [PATCH] dont add unnecessary https:// --- files/helpers/sanitize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 52e757ae8..31a519d67 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -567,7 +567,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis #don't allow something like this [https://rԁrama.net/leaderboard](https://iplogger.org/1fRKk7) if not snappy: string_domain = tldextract.extract(str(link.string)).registered_domain - if string_domain and link.string != href: + if string_domain and string_domain != domain: link.string = href #insert target="_blank" and ref="nofollower noopener" for external link