diff --git a/backbone.js b/backbone.js index ceb22e5b..e8896567 100644 --- a/backbone.js +++ b/backbone.js @@ -832,9 +832,9 @@ fragment = window.location.hash; } } - fragment = decodeURIComponent(fragment.replace(routeStripper, '')); + fragment = decodeURIComponent(fragment); if (!fragment.indexOf(this.options.root)) fragment = fragment.substr(this.options.root.length); - return fragment; + return fragment.replace(routeStripper, ''); }, // Start the hash change handling, returning `true` if the current URL matches