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
694
694
695
695
NSURL * errorUrl = vc.errorURL ;
696
696
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];
698
699
NSLog (@" %@ " , [errorUrl absoluteString ]);
699
700
[theWebView loadRequest: [NSURLRequest requestWithURL: errorUrl]];
700
701
}
@@ -769,7 +770,7 @@ - (void) webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigat
769
770
[scheme isEqualToString: @" facetime" ] ||
770
771
[scheme isEqualToString: @" sms" ] ||
771
772
[scheme isEqualToString: @" maps" ]) {
772
- [[UIApplication sharedApplication ] openURL: url];
773
+ [[UIApplication sharedApplication ] openURL: url options: @{} completionHandler: nil ];
773
774
decisionHandler (WKNavigationActionPolicyCancel );
774
775
} else {
775
776
decisionHandler (WKNavigationActionPolicyAllow );
You can’t perform that action at this time.
0 commit comments