File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -694,7 +694,8 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(WKNavigation*)navigati
694694
695695 NSURL * errorUrl = vc.errorURL ;
696696 if (errorUrl) {
697- errorUrl = [NSURL URLWithString: [NSString stringWithFormat: @" ?error=%@ " , [message stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]] relativeToURL: errorUrl];
697+ NSCharacterSet *charSet = [NSCharacterSet URLFragmentAllowedCharacterSet ];
698+ errorUrl = [NSURL URLWithString: [NSString stringWithFormat: @" ?error=%@ " , [message stringByAddingPercentEncodingWithAllowedCharacters: charSet]] relativeToURL: errorUrl];
698699 NSLog (@" %@ " , [errorUrl absoluteString ]);
699700 [theWebView loadRequest: [NSURLRequest requestWithURL: errorUrl]];
700701 }
@@ -769,7 +770,7 @@ - (void) webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigat
769770 [scheme isEqualToString: @" facetime" ] ||
770771 [scheme isEqualToString: @" sms" ] ||
771772 [scheme isEqualToString: @" maps" ]) {
772- [[UIApplication sharedApplication ] openURL: url];
773+ [[UIApplication sharedApplication ] openURL: url options: @{} completionHandler: nil ];
773774 decisionHandler (WKNavigationActionPolicyCancel );
774775 } else {
775776 decisionHandler (WKNavigationActionPolicyAllow );
You can’t perform that action at this time.
0 commit comments