From 89b65fda0eee41e074c1b974aca244f6c615168e Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 12 Feb 2024 17:04:18 +0200 Subject: [PATCH] fix this https://rdrama.net/post/242744/will-stancil-is-absolutely-based/5870877#context --- 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 90c531e5a..2121b47ec 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -554,7 +554,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 string_domain != tldextract.extract(href).registered_domain: + if string_domain and link.string != href: link.string = href #insert target="_blank" and ref="nofollower noopener" for external link