mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-05 14:00:10 +00:00
Fix unnecessary escape
This commit is contained in:
parent
721b504e25
commit
4a0758db24
@ -56,7 +56,7 @@ exports.querystringStringify = function (obj) {
|
|||||||
var saved = querystring.escape
|
var saved = querystring.escape
|
||||||
querystring.escape = escape // global
|
querystring.escape = escape // global
|
||||||
var ret = querystring.stringify(obj)
|
var ret = querystring.stringify(obj)
|
||||||
ret = ret.replace(/[\@\*\/\+]/g, function (char) {
|
ret = ret.replace(/[@\*\/\+]/g, function (char) {
|
||||||
// `escape` doesn't encode the characters @*/+ so we do it manually
|
// `escape` doesn't encode the characters @*/+ so we do it manually
|
||||||
return '%' + char.charCodeAt(0).toString(16).toUpperCase()
|
return '%' + char.charCodeAt(0).toString(16).toUpperCase()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user