From d16604b345b21c6c6383a5e4e204ccda7f0bbcc0 Mon Sep 17 00:00:00 2001 From: bashrc Date: Fri, 24 Apr 2026 23:07:03 +0100 Subject: [PATCH] Tidying --- utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 219a53ec9..35a6e93fd 100644 --- a/utils.py +++ b/utils.py @@ -4035,8 +4035,10 @@ def resembles_domain(text: str) -> bool: Why not use validators? It's so that exotic, potentially p2p domains may be used. """ - if ' ' in text or '/' in text or '-' in text or '<' in text or \ - ';' in text or '"' in text or '(' in text or ')' in text: + not_domain_chars = ( + ' ', '/', '-', '<', ';', '"', '(', ')', '_', ',', '?', "'" + ) + if string_contains(text, not_domain_chars): return False # conventional domain