On Jan 21, 2016, at 17:17 , Jeff Evans <jev...@ars-nova.com> wrote:
> 
>       In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works 
> fine unless I try to add an anchor to the path, for example,
> 
> [path]/filename.html#anchorname
> 
> The problem appears to be that the # gets escaped to %23. 

Can you show what APIs you’re using for this? Are you appending the anchor to 
an existing string or URL? Are you explicitly creating a file URL, or a generic 
URL? 

Looking at NSURL documentation, it looks like NSURL recognizes the anchor as a 
piece called “fragment”.

> I tried [NSURL URLWithString: anchorname relativeToURL: baseURL] but this 
> produces a url with the form 

This doesn’t seem likely to work. In this API, the first parameter is assumed 
to *be* a URL, albeit in relative form, not a URL piece, which is what you have.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to