documentcloud/backbone — pull request #1794 by djbriane (2012-11-02 04:48:30+00:00)
Title: Issue #1793: Backbone.history.navigate should use this.getFragment

Issue #1793: Backbone.history.navigate should use this.getFragment instead of fragment to avoid routes getting triggered twice.

When Backbone.history.checkUrl is called, it compares the valued returned from this.getFragment (which is pulled from window.location) to Backbone.history.fragment which is set during Backbone.history.navigate but is set before it has been added to window.location. The effect of this is when trailing spaces are present in the fragment they are not present after being added to window.location (only happens when pushState is false).

See this issue for more: https://github.com/documentcloud/backbone/issues/1793