Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Fix for issue 4882 #5221

Merged
merged 5 commits into from
Oct 26, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define( [
// [16]: ?msg=1234&type=unread
// [17]: #msg-content
//
urlParseRE: /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
urlParseRE: /^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,

// Abstraction to address xss (Issue #4787) by removing the authority in
// browsers that auto decode it. All references to location.href should be
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/navigation/navigation_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,4 +1307,18 @@
}
]);
});

asyncTest( "external page is accessed correctly even if it has a space in the url", function(){
$.testHelper.pageSequence([
function(){
$.mobile.changePage( " external.html" );
},
function(){
equal( $.mobile.activePage.attr( "id" ), "external-test", "the correct page is loaded" );
start();
}

]);
});

})(jQuery);