mirror of
https://github.com/logos-storage/bittorrent-tracker.git
synced 2026-01-03 21:43:12 +00:00
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:
parent
40707a1605
commit
9962d31e69
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user