Skip to content

Commit

Permalink
Comment special treatment of '+' in URL query parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dasilvacontin committed Apr 20, 2017
1 parent e2c9514 commit 73929ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils.js
Expand Up @@ -322,7 +322,9 @@ exports.parseQuery = function (qs) {
var key = pair.slice(0, i);
var val = pair.slice(++i);

// Due to how the URLSearchParams API treats spaces
obj[key] = decodeURIComponent(val.replace(/\+/g, '%20'));

return obj;
}, {});
};
Expand Down

0 comments on commit 73929ad

Please sign in to comment.