File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,7 @@ module.exports = {
30
30
31
31
let user_agent = opts . user_agent || `${ pkg . name } /${ pkg . version } ` ;
32
32
33
- // Decoding and encoding is required to prevent encoding already encoded URLs
34
- // We decode using the decodeURIComponent as it will decode a wider range of
35
- // characters that were not necessary to be encoded at first, then we re-encode
36
- // only the required ones using encodeURI.
37
- // Note that we don't use encodeURIComponents as it adds too much non-necessary encodings
38
- // see "Not Escaped" list in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#description
39
- const url = encodeURI ( decodeURIComponent ( new URL ( link , opts . baseUrl ) . toString ( ) ) ) ;
33
+ const url = new URL ( link , opts . baseUrl ) . toString ( ) ;
40
34
41
35
const options = {
42
36
agent : new ProxyAgent ( ) ,
You can’t perform that action at this time.
0 commit comments