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

Fix for issue 4882 #5221

merged 5 commits into from
Oct 26, 2012

Conversation

jefflembeck
Copy link
Contributor

Changed the url parser's regular expression to eliminate any leading white space. Browsers ignore this space, so this is expected behavior. With the latest, it will create a 404. Before that, it would cause the next page to load without ajax.

This fixes issue #4882.

behavior in browsers. This used to result in pages changing to
"%20destination.html" instead of the now "destination.html". Fixes issue jquery-archive#4882
@gseguin
Copy link
Contributor

gseguin commented Oct 25, 2012

@jlembeck, thanks for the PR.

That test passes without your patch to the regexp in Chrome 22 / OSX. Could you provide a test that fails with the code on master?

@jefflembeck
Copy link
Contributor Author

This test fails without the code change and passes with it on Chrome 22/ OS X. Thanks @gseguin

$.mobile.changePage( " external.html" );
},
function(){
ok( $.mobile.activePage.attr( "id" ) === "external-test", "the correct page is loaded" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't equal more appropriate than ok here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Change made.

gseguin added a commit that referenced this pull request Oct 26, 2012
@gseguin gseguin merged commit b88b6f3 into jquery-archive:master Oct 26, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants