Skip to content

Commit

Permalink
Use strict resolution for generic URLs (fixes issue #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
alwinb committed Jun 6, 2021
1 parent 3612935 commit f884726
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,10 @@ function parseAuth (input, mode, percentCoded = true) {

const WHATWGParseResolve = (input, base) => {
const baseUrl = parse (base)
const url = parse (input, modeFor (baseUrl))
return percentEncode (normalise (forceResolve (url, baseUrl)))
const baseMode = modeFor (baseUrl)
const url = parse (input, baseMode)
const strict = modeFor (url, baseMode) === modes.generic
return percentEncode (normalise (forceResolve (url, baseUrl, { strict })))
}


Expand Down

0 comments on commit f884726

Please sign in to comment.