From b2f5c026e69dcb95ccea46ebaea2c5d316bb6a6b Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sun, 1 Sep 2013 16:05:09 +0200 Subject: [PATCH] Always encode a parameter's value (if needed). fixes #468 --- modoboa/static/js/history.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modoboa/static/js/history.js b/modoboa/static/js/history.js index 562aa4605..72cd2c069 100644 --- a/modoboa/static/js/history.js +++ b/modoboa/static/js/history.js @@ -134,16 +134,12 @@ History.prototype = { } var elems = str.split('&'); for (var i = 0; i < elems.length; i++) { - this.setparamfromstring(elems[i]); + var pdef = elems[i].split('='); + this.setparam(pdef[0], pdef[1]); } return this; }, - setparamfromstring: function(str) { - var def = str.split('='); - this.params[def[0]] = def[1]; - }, - setparam: function(name, value, encode) { if (encode == undefined || encode) { this.params[name] = encodeURIComponent(value);