From 3fcf7e702c6d1e2f907cfd582cc642d4dab4c6c4 Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 23 Feb 2026 14:20:21 +0000 Subject: [PATCH] url checking suitable for yggdrassil address --- utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 02212580a..39a3f98bc 100644 --- a/utils.py +++ b/utils.py @@ -3953,7 +3953,8 @@ def get_reply_to(post_json_object: {}) -> str: def resembles_url(text: str) -> bool: """Does the given text look like a url? """ - if '://' in text and '.' in text and \ + if '://' in text and \ + ('.' in text or ('[' in text and ']' in text and ':' in text)) and \ ' ' not in text and '<' not in text: return True return False