Skip to content
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

string ends with dot is recognized as valid domain #129

Closed
librz opened this issue Jul 13, 2021 · 1 comment
Closed

string ends with dot is recognized as valid domain #129

librz opened this issue Jul 13, 2021 · 1 comment

Comments

@librz
Copy link

librz commented Jul 13, 2021

const result = parseDomain("example.co.jp."); // string ends with a dot
if (result.type === ParseResultType.Listed) {
  console.log(":(")
}
@librz librz changed the title string ends with dot is recognized as valid tld string ends with dot is recognized as valid domain Jul 13, 2021
@jhnns
Copy link
Member

jhnns commented Sep 2, 2021

"example.co.jp." is a valid domain. The empty label in the end is the root label and considered to be valid.

See Fully qualified domain name

@jhnns jhnns closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants