urlite
urlite copied to clipboard
Parse fails when password contains '@'
Parse fails when password contains @
--- i/test/test-parse.js
+++ w/test/test-parse.js
@@ -33,7 +33,7 @@ describe('parse', function () {
})
it('should handle auth', function () {
- var url = 'proto://user:[email protected]:3000/some/pathname?query=string#fragment'
+ var url = 'proto://user:pass@[email protected]:3000/some/pathname?query=string#fragment'
expect(parse(url)).to.eql({
auth: 'user:password',
hash: '#fragment',
btw, parsing the url works using new URL()