Use encode/decodeURIComponent().
authorJan Schneider <jan@horde.org>
Mon, 15 Mar 2010 18:06:56 +0000 (19:06 +0100)
committerJan Schneider <jan@horde.org>
Mon, 15 Mar 2010 18:07:26 +0000 (19:07 +0100)
horde/js/dhtmlHistory.js

index 3156d78..5ce30f9 100644 (file)
@@ -199,7 +199,7 @@ Horde.dhtmlHistory = {
         if (Prototype.Browser.WebKit) {
             return this.getSafariState();
         } else {
-            return this.removeHash(unescape(location.hash));
+            return this.removeHash(decodeURIComponent(location.hash));
         }
     },
 
@@ -230,7 +230,7 @@ Horde.dhtmlHistory = {
 
         // Save this as our current location and change the browser location
         this.currentLocation = newLoc;
-        this.setLocation(escape(newLoc));
+        this.setLocation(encodeURIComponent(newLoc));
 
         // Change the hidden iframe's location if on IE
         if (Prototype.Browser.IE) {
@@ -357,7 +357,7 @@ Horde.dhtmlHistory = {
         }
 
         // Get the new location
-        this.setLocation(escape(newLoc));
+        this.setLocation(encodeURIComponent(newLoc));
 
         // Notify listeners of the change
         this.fireHistoryEvent(newLoc);