From 6a396c2c200b764290ca5c095ebeb873a8795f4a Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Tue, 12 Aug 2014 20:41:36 +0300 Subject: [PATCH] [ios] Fixed non-opening local links on web pages in our webviewcontroller --- iphone/Common/WebViewController.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iphone/Common/WebViewController.mm b/iphone/Common/WebViewController.mm index 17b77066a9..b1d42c3f34 100644 --- a/iphone/Common/WebViewController.mm +++ b/iphone/Common/WebViewController.mm @@ -52,7 +52,8 @@ - (BOOL)webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType { - if (self.openInSafari && inType == UIWebViewNavigationTypeLinkClicked) + if (self.openInSafari && inType == UIWebViewNavigationTypeLinkClicked + && ![inRequest.URL.scheme isEqualToString:@"applewebdata"]) // do not try to open local links in Safari { [[UIApplication sharedApplication] openURL:[inRequest URL]]; return NO;