urlite icon indicating copy to clipboard operation
urlite copied to clipboard

Parse fails when password contains '@'

Open gudleik opened this issue 1 year ago • 0 comments

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()

gudleik avatar May 27 '23 11:05 gudleik