Pregunta

I have a UIWbView and I load it with an encoded url: http%3A%2F%2Fwww.google.com%0A

When i debug, and stop at:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 

the [[request URL] absoluteString] returns

{ URL: file://http%3A%2F%2Fwww.google.com%0A }

The framework added file:// prefix, WHY??? I didn't ask for that... :/

¿Fue útil?

Solución

It assumed it was a file:// URL as it didn't find a URL scheme in http%3A%2F%2Fwww.google.com%0A.

Change the URL to http://www.google.com and it will be fine (that trailing %0A is also suspicious).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top