Hi All,

When browsing the local developer documentation, Safari shows file URLs that 
look like this:

        file:///path/index.html#more/path/actualFile.html#some_location

(A full example is pasted below)

So they contain multiple fragments (the '#' part), and Safari happily opens 
them when pasted in the address field. 

Unfortunately NSURL has no idea what to do with that string, nor does (for 
example) the 'open' command. Percent-escaping the '#' yields a non-functioning 
URL.

One way to make those URLs work with NSURL is by eliminating the 'index.html#' 
part.

Questions:

- Are those actually 'legal' URLs?
- How can I handle them to make them into something NSURL can handle?

Thanks

Gerd


Full example of such a URL:

file:///Library/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleLion.CoreReference.docset/Contents/Resources/Documents/index.html#documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html%23//apple_ref/occ/clm/NSArray/array


_______________________________________________

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