mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
753a1156fe
commit
d16604b345
6
utils.py
6
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue