commit
3b538104f5
|
@ -746,7 +746,9 @@ class InAppBrowserWebViewController: UIViewController, UIScrollViewDelegate, WKU
|
|||
}
|
||||
else if message.name == "resourceLoaded" && (webViewOptions?.useOnLoadResource)! {
|
||||
if let resource = convertToDictionary(text: message.body as! String) {
|
||||
let url = URL(string: resource["name"] as! String)!
|
||||
let rawUrl = resource["name"] as! String
|
||||
let encodedUrl = rawUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
|
||||
let url = URL(string: encodedUrl)!
|
||||
if !UIApplication.shared.canOpenURL(url) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue