Skip to content

Commit 9962d31

Browse files
authored
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
1 parent 40707a1 commit 9962d31

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/common-node.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,10 @@ exports.querystringParse = function (q) {
6666
* @return {string}
6767
*/
6868
exports.querystringStringify = function (obj) {
69-
var saved = querystring.escape
70-
querystring.escape = escape // global
71-
var ret = querystring.stringify(obj)
69+
var ret = querystring.stringify(obj, { encodeURIComponent: escape })
7270
ret = ret.replace(/[@*/+]/g, function (char) {
7371
// `escape` doesn't encode the characters @*/+ so we do it manually
7472
return '%' + char.charCodeAt(0).toString(16).toUpperCase()
7573
})
76-
querystring.escape = saved
7774
return ret
7875
}

0 commit comments

Comments
 (0)