If I use an encoded url to open in WKWebView, this webView can not open this link。
NSString* request = @"http%3A%2F%2Fwww.baidu.com%0A";
NSURL* url = [NSURL URLWithString:request];
[self.webView loadRequest:[NSURLRequest requestWithURL:url]];
So I must to decode the url before passed it to WKWebView . Any other pretty way to make the WKWebView support encoded url?
No, there's no other way. Decode the URL. I'm guessing you got this from a URL query string field. If so, take advantage of
NSURLComponents. That makes it easy to grab the unencoded value for a query string part.