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

Regular expression matching for URL's. Maintained, safe, and browser-friendly version of url-regex. Resolves CVE-2020-7661 for Node.js servers.

Results 8 url-regex-safe issues
Sort by recently updated
recently updated
newest added

Currently if I try to run urlRegexSafe on a string like 'http://www.google.com.' it will return 'http://www.google.com' as the first match but if I were to run it on 'http://www.google.com/subdir.' it...

In order to do things like: ```typescript escapeHTML(text).replace( urlRegexSafe(), '$1' ) ```

To properly support browsers, replace [`re2`](https://github.com/uhop/node-re2) with [`re2-wasm`](https://github.com/google/re2-wasm)

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.

Hi, `` (Wikipedia Homepage) Here the URL that is matched is **wikipedia.org/assets/img/Wikipedia-logo-v2.png** instead of **portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png** ``` var matches = StringToMatch.match(urlRegexSafe({ localhost: false, ipv4: false, ipv6: false })); ``` Am I...

## 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...

bug

## Describe the bug **Node.js version:** v18.18.2 **OS version:** macOS 14.2.1 **Description:** If a valid protocol has extra characters preceding it, the extra characters are included in the match. ##...

bug

This is a PR to add a test for issue #31. Also, something automatically reformatted index.js slightly. ## Checklist - [x] I have ensured my pull request is not behind...