diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 28b1bd9..72effaa 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -231,11 +231,18 @@ - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options { - NSURLRequest* request = [NSURLRequest requestWithURL:url]; + NSURLRequest* request = [NSURLRequest requestWithURL:url]; + #ifdef __CORDOVA_4_0_0 - [self.webViewEngine loadRequest:request]; + // the webview engine itself will filter for this according to policy + // in config.xml for cordova-ios-4.0 + [self.webViewEngine loadRequest:request]; #else + if ([self.commandDelegate URLIsWhitelisted:url]) { [self.webView loadRequest:request]; + } else { // this assumes the InAppBrowser can be excepted from the white-list + [self openInInAppBrowser:url withOptions:options]; + } #endif }