title: Why does the url in the request of a decidePolicyForNavigationAction return http://localhost:8888/%E2%80%9Chttp://example.com%E2%80%9D
body: <p>Good morning SO,</p>
  
  <p>I have a mac webView (Not iOS UIWebView) that loads with url pointing to <code>http://localhost:8888</code>. The loaded html contains links and iframes but when an iframe loads, or a link is clicked the main page attempts to load <code>http://localhost:8888/%E2%80%9Chttp://example.com%E2%80%9D</code> and then reloads the original page <code>http://localhost:8888.</code>. What's even stranger is that the opened link or iframe indeed tries to load <code>http://localhost:8888/%E2%80%9Chttp://example.com%E2%80%9D</code>.</p>
  
  <p>I tried to handle this with decidePolicyForNavigationAction but the <code>[request URL]</code> value arrives that way and parsing it to extract the embedded url seems way hackish.</p>
  
  <p>Any ideas on to why the webView builds url's this way and how to handle loading iframes and links correctly? </p>
  
  <pre><code>- (void)webView:(WebView *)webView
  decidePolicyForNavigationAction:(NSDictionary *)actionInformation
          request:(NSURLRequest *)request
            frame:(WebFrame *)frame
  decisionListener:(id &lt;WebPolicyDecisionListener&gt;)listener
  {
      NSLog(@"Navigating to %@", [request URL]); // returns http://localhost:8888/%E2%80%9Chttp://example.com%E2%80%9D
      [listener use];
  }
  
  - (void)webView:(WebView *)webView
  decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
          request:(NSURLRequest *)request
     newFrameName:(NSString *)frameName
  decisionListener:(id &lt; WebPolicyDecisionListener &gt;)listener {
      if ([actionInformation objectForKey:WebActionElementKey]) {
          // Happens here also :(
          NSLog(@"Opening in browser %@", [request URL]);
          [[NSWorkspace sharedWorkspace] openURL:[request URL]];
      }
  }
  </code></pre>