From b72c410a67ece12c0419689602c24be6154b76f4 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Thu, 28 Jun 2012 13:29:10 +0200 Subject: [PATCH] Don't forget to decode location.hash before it can be used for a comparison. fixes #282 --- modoboa/static/js/history.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modoboa/static/js/history.js b/modoboa/static/js/history.js index 71d953b2f..4795066d3 100644 --- a/modoboa/static/js/history.js +++ b/modoboa/static/js/history.js @@ -203,11 +203,13 @@ History.prototype = { }, check: function() { - if (this.serialized == location.hash && this.force === undefined) { + var decodedhash = decodeURIComponent(location.hash); + + if (this.serialized == decodedhash && this.force === undefined) { return; } delete(this.force); - this.from_string(decodeURIComponent(location.hash)); + this.from_string(decodedhash); if (!this.serialized) { location.hash = this.options.deflocation; return;