diff --git a/lib/querystring.js b/lib/querystring.js index 4246e96..0b15e76 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -10,6 +10,11 @@ exports.version = '0.3.1'; +/** + * Decode function. + */ +exports.decoder = decodeURIComponent; + /** * Object#toString() ref for stringify(). */ @@ -45,7 +50,7 @@ exports.parse = function(str){ .split('&') .reduce(function(ret, pair){ try{ - pair = decodeURIComponent(pair.replace(/\+/g, ' ')); + pair = exports.decoder(pair.replace(/\+/g, ' ')); } catch(e) { // ignore }