Accept domains with a label starting with an underscore.

This commit is contained in:
Philippe Pittoli 2024-12-09 20:08:01 +01:00
parent 714a305a9f
commit 89e970f450

View File

@ -7,7 +7,7 @@ def label_pattern
end end
def subdomain_pattern def subdomain_pattern
/\b(?:[0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*\b/ /\b(?:[_0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*\b/
end end
# /^(((?!-))(xn--|_{1,1})?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)* # /^(((?!-))(xn--|_{1,1})?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*