From 664d088d2b7670985f849cc2a34ee9a6513707d2 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 25 Apr 2012 17:09:50 +0200 Subject: [PATCH] The serialisation function was not handling parameters correctly. see #204 --- static/js/history.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/static/js/history.js b/static/js/history.js index 27056fbbb..403a8f488 100644 --- a/static/js/history.js +++ b/static/js/history.js @@ -95,17 +95,19 @@ History.prototype = { serialize: function() { var res = this.base; + var args = ""; if (this.paramslength() != 0) { - res += "?"; + args += "?"; + console.log(this.params); $.each(this.params, function(key, value) { - if (res != "?") { - res += "&"; + if (args != "?") { + args += "&"; } - res += key + "=" + encodeURIComponent(value); + args += key + "=" + encodeURIComponent(value); }); } - return res; + return res + args; }, update: function(force, noupdate) {