Skip to content

Commit

Permalink
Fixed jquery-archive#2234 - form hijacking wasn't respecting allowCro…
Browse files Browse the repository at this point in the history
…ssDomainPages, now it does!
  • Loading branch information
adrianpike authored and johnbender committed Jun 12, 2012
1 parent 1e83051 commit 78350c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/jquery.mobile.navigation.js
Expand Up @@ -1230,8 +1230,10 @@ define( [


url = path.makeUrlAbsolute( url, getClosestBaseUrl($this) ); url = path.makeUrlAbsolute( url, getClosestBaseUrl($this) );


//external submits use regular HTTP // More info about what's going on here is up in useDefaultUrlHandling in the Click routing.
if( path.isExternal( url ) || target ) { // Basically if we loaded via file:// and we've got "allowCrossDomainPages" true, we should use changePage.
isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && documentUrl.protocol === "file:");
if(( path.isExternal( url ) && !isCrossDomainPageLoad) || target ) {
return; return;
} }


Expand Down

0 comments on commit 78350c3

Please sign in to comment.