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

Does not allow dashes in hostnames #1

Open
fields opened this issue Jul 22, 2013 · 3 comments
Open

Does not allow dashes in hostnames #1

fields opened this issue Jul 22, 2013 · 3 comments

Comments

@fields
Copy link

fields commented Jul 22, 2013

Dashes are valid in hostnames. The latter part of the regexp in isAValidUrl? should be, at a minimum:

"//([[:alpha:][:digit:]-.]{2,})([.]{1})([[:alpha:]]{2,4})(/)")

(This should also probably be updated to include longer TLDs.)

@alx
Copy link
Owner

alx commented Jul 22, 2013

Hi Adam,

Yes, this regexp is surely better.

This project is 4 years old and I've abandoned it for too long :)

I don't know how to do it on github (maybe changing the README.md like on some projects), but would you like to take the lead on this project?

Thanks a lot,

Alex

@fields
Copy link
Author

fields commented Jul 23, 2013

Possibly. Let me think about it. I suppose the other options is that no one will do it. :)

Still - I haven't found an alternative that's better, and this has been pretty useful for me.

@fields
Copy link
Author

fields commented Jul 23, 2013

On the topic at hand, I actually think regexps are a pretty poor way to validate uris, and we should probably use the built-in URI object now.

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