Skip to content
This repository
Browse code

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

… now it does!
  • Loading branch information...
commit 2edf53f62d63a909edbd0292e224e902c2a14134 1 parent 42a5c60
Adrian Pike authored November 16, 2011 johnbender committed June 12, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  js/jquery.mobile.navigation.js
6  js/jquery.mobile.navigation.js
@@ -1227,8 +1227,10 @@ define( [
1227 1227
 
1228 1228
 			url = path.makeUrlAbsolute(  url, getClosestBaseUrl($this) );
1229 1229
 
1230  
-			//external submits use regular HTTP
1231  
-			if( path.isExternal( url ) || target ) {
  1230
+			// More info about what's going on here is up in useDefaultUrlHandling in the Click routing.
  1231
+			// Basically if we loaded via file:// and we've got "allowCrossDomainPages" true, we should use changePage.
  1232
+			isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && documentUrl.protocol === "file:");
  1233
+			if(( path.isExternal( url ) && !isCrossDomainPageLoad) || target ) {
1232 1234
 				return;
1233 1235
 			}
1234 1236
 

0 notes on commit 2edf53f

Please sign in to comment.
Something went wrong with that request. Please try again.