diff options
Diffstat (limited to 'lib/querystring.js')
-rw-r--r-- | lib/querystring.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/querystring.js b/lib/querystring.js index 467eabdea7..d7abc48993 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -185,12 +185,12 @@ QueryString.parse = QueryString.decode = function(qs, sep, eq, options) { qs.forEach(function(kvp) { var x = kvp.split(eq), k, v, useQS = false; try { - if (kvp.match(/\+/)) { // decodeURIComponent does not decode + to space + if (kvp.match(/\+/)) { // decodeURIComponent does not decode + to space throw 'has +'; } k = decodeURIComponent(x[0]); - v = decodeURIComponent(x.slice(1).join(eq) || ""); - } catch(e) { + v = decodeURIComponent(x.slice(1).join(eq) || ''); + } catch (e) { k = QueryString.unescape(x[0], true); v = QueryString.unescape(x.slice(1).join(eq), true); } |