• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird DocSets URLs which NSURL can't handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Weird DocSets URLs which NSURL can't handle
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: NSURL and NSRegularExpression
  • Next by Date: Re: NSURL and NSRegularExpression
  • Previous by thread: Re: setAllowedFileTypes: (or similar) for NSPasteboard
  • Next by thread: Re: Weird DocSets URLs which NSURL can't handle
  • Index(es):
    • Date
    • Thread