url-regex-safe icon indicating copy to clipboard operation
url-regex-safe copied to clipboard

Invalid port

Open issue-submission opened this issue 4 years ago • 1 comments

Hi,

It seems that the regular expression considers as valid URLs containing a port that is not valid. For example: http://localhost:99999 or https://www.iana.org:65536.

issue-submission avatar Aug 17 '21 15:08 issue-submission

It seems that a few suggestions could be found here. Not sure how much would that affect the matching speed.

I suppose that this package is not trying to validate if the URL address in that much detail.

pjotrsavitski avatar Sep 22 '21 23:09 pjotrsavitski

validator.isURL or another URL validator should be used on matches - however we'd welcome a PR to fix this and then would do a major semver bump on release to npm/GitHub

titanism avatar Oct 01 '23 17:10 titanism