Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Some valid URLs are not recognized correctly #113

Closed
allo- opened this issue Oct 14, 2018 · 4 comments
Closed

Some valid URLs are not recognized correctly #113

allo- opened this issue Oct 14, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@allo-
Copy link

allo- commented Oct 14, 2018

When you try to add http://someserver:8080/some/path, webcatalog does not recognize it as valid URL.

@quanglam2807 quanglam2807 added the bug Something isn't working label Oct 16, 2018
@quanglam2807
Copy link
Member

I think it's because someserver is not valid domain or IP.

@allo-
Copy link
Author

allo- commented Oct 16, 2018

This may be possible, that not the port is the problem, but that this is just a hostname in my LAN and no FQDN.
But it is a valid URL and when disabling the is-url check, I can use webcatalog to access it.

The alternative would be to use a pseudo domain like .local, but I do not do this in my normal browser either.

@quanglam2807
Copy link
Member

There's a PR for this segmentio/is-url#16. But nobody has merged it yet. :(

@quanglam2807 quanglam2807 changed the title Error: "URL must be URL." Not all valid URL are recognized correctly Oct 16, 2018
@quanglam2807 quanglam2807 changed the title Not all valid URL are recognized correctly Some valid URL are not recognized correctly Oct 16, 2018
@allo-
Copy link
Author

allo- commented Oct 16, 2018

It looks like the PR is only adding tests?

What about just including the relevant code instead of loading the module to avoid waiting on upstream?

Another option: Use HTML5 Inputs instead of validating yourself? This seems to be the right place to do it, if we assume that users have a recent browser backend.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url

@quanglam2807 quanglam2807 changed the title Some valid URL are not recognized correctly Some valid URLs are not recognized correctly Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants