Update common-node.js

i was just reading the source and noticed this, if there is some reason it won't work please let me know
This commit is contained in:
Gus Caplan 2017-02-21 17:07:03 -06:00 committed by GitHub
parent 40707a1605
commit 9962d31e69

View File

@ -66,13 +66,10 @@ exports.querystringParse = function (q) {
* @return {string}
*/
exports.querystringStringify = function (obj) {
var saved = querystring.escape
querystring.escape = escape // global
var ret = querystring.stringify(obj)
var ret = querystring.stringify(obj, { encodeURIComponent: escape })
ret = ret.replace(/[@*/+]/g, function (char) {
// `escape` doesn't encode the characters @*/+ so we do it manually
return '%' + char.charCodeAt(0).toString(16).toUpperCase()
})
querystring.escape = saved
return ret
}