url-regex
url-regex copied to clipboard
Decode error
trafficstars
The presence of ).{% trailing a valid URL (e.g. http://cnn.com/).{%) causes the error:
[PATH]/node_modules/normalize-url/index.js:82
urlObj.pathname = decodeURI(urlObj.pathname);
^
URIError: URI malformed
at decodeURI (native)
at module.exports ([PATH]/node_modules/normalize-url/index.js:82:21)
at [PATH]/node_modules/get-urls/index.js:14:10
at Array.map (native)
at module.exports ([PATH]/node_modules/get-urls/index.js:13:24)
at [PATH]/index.js:17:16
at Array.forEach (native)
at [PATH]/index.js:15:9
at [PATH]/node_modules/recursive-readdir/index.js:64:22
at [PATH]/node_modules/recursive-readdir/index.js:64:22
Note that @sindresorhus punted to you. https://github.com/sindresorhus/get-urls/issues/15#issuecomment-262281028
@wadewegner is it still reproducible? I tried with the latest master and the problem is probably resolved.
Please use https://github.com/niftylettuce/url-regex-safe as this package has a severe vulnerability (see #70).