Permalink
Browse files

Fixed #2234 - form hijacking wasn't respecting allowCrossDomainPages,…

… now it does!
  • Loading branch information...
1 parent 1e83051 commit 78350c3bbd9d24f38ddb66c49060497f163ce687 @adrianpike adrianpike committed with Nov 16, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/jquery.mobile.navigation.js
@@ -1230,8 +1230,10 @@ define( [
url = path.makeUrlAbsolute( url, getClosestBaseUrl($this) );
- //external submits use regular HTTP
- if( path.isExternal( url ) || target ) {
+ // More info about what's going on here is up in useDefaultUrlHandling in the Click routing.
+ // 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;
}

0 comments on commit 78350c3

Please sign in to comment.