-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isURL() #1253
Comments
Not sure if |
Yep, I'm seeing this as well. See here Mind if I make a PR for this fix? |
@dok -- you test case is a different one, can you add |
There's nothing special about underscore, lone or otherwise. Domain names in common display format are composed of dot-separated labels, and each label may contain any octet in any order (including not just underscore, but also ASCII control characters like 0x00 and 0x7F and non-ASCII values like 0xA0). The subset of domain names that are "host names" limit label octets to ASCII letters, digits, and hyphens (LDH) via the "preferred name syntax", but it remains possible to resolve and use domain names outside of that subset. From RFC 8499 (emphasis mine):
So if "foo_bar.example.com" is accepted with a given set of options, then "_.example.com" should be as well. |
validator.isURL('http://_.test.com',{allow_underscores:true});
is falseThe text was updated successfully, but these errors were encountered: