Support closing parentheses in URLs do not match
michelnev opened this issue · 3 comments
michelnev commented
Describe the bug
Node.js version: v20.9.0
OS version: FreeBSD freebsd 13.2-RELEASE-p4
Description: URL with )
characters are not matched.
Actual behavior
Testing with an exact match against a url like http://foo.com/blah_blah_(wikipedia)
returns false.
Expected behavior
Testing with an exact match against a URL like http://foo.com/blah_blah_(wikipedia)
should return true.
Code to reproduce
const urlRegex = require( 'url-regex-safe' );
const s0 = 'http://foo.com/blah_blah_(wikipedia';
const s1 = 'http://foo.com/blah_blah_(wikipedia)';
// Returns true as expected
console.log(urlRegex({exact: true}).test(s0));
// Should be true, but return false
console.log(urlRegex({exact: true}).test(s1));
Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
titanism commented
PR welcome!
IITII commented
also need for this
titanism commented
PR is welcome