Weird DocSets URLs which NSURL can't handle
Weird DocSets URLs which NSURL can't handle
- Subject: Weird DocSets URLs which NSURL can't handle
- From: Gerd Knops <email@hidden>
- Date: Sun, 04 Mar 2012 10:54:01 -0600
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#//apple_ref/occ/clm/NSArray/array
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden