• 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
Re: Correct way to specify anchors with NSURL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct way to specify anchors with NSURL?


  • Subject: Re: Correct way to specify anchors with NSURL?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 21 Apr 2016 00:18:48 -0700
  • Feedback-id: 167118m:167118agrif8a:167118s5N7Wtmkm8:SMTPCORP

On Apr 21, 2016, at 00:09 , Graham Cox <email@hidden> wrote:
>
> It strikes me that it’s a bug that URLByAppendingPathComponent: doesn’t parse for a fragment just as -initWithString: does though, the anchor/fragment is a perfectly reasonable part of a path and what other possible ambiguious meaning could it have? It makes hard work of something that should be easy.

The point is that an unescaped “#” or “?” is a delimiter of the *end* of the path portion of the URL. If a *path* component — URLByAppendingPathComponent — contains one of these characters, it’s by definition part of the path and not a delimiter, and so must be escaped.

The issue is that nobody (e.g. you) cares about that. For practical purposes, it’s just a string and you should be able to append stuff to it.
_______________________________________________

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


References: 
 >Correct way to specify anchors with NSURL? (From: Graham Cox <email@hidden>)
 >Re: Correct way to specify anchors with NSURL? (From: Quincey Morris <email@hidden>)
 >Re: Correct way to specify anchors with NSURL? (From: Graham Cox <email@hidden>)
 >Re: Correct way to specify anchors with NSURL? (From: Quincey Morris <email@hidden>)
 >Re: Correct way to specify anchors with NSURL? (From: Graham Cox <email@hidden>)

  • Prev by Date: Thoughts on autolayout
  • Next by Date: Re: Correct way to specify anchors with NSURL?
  • Previous by thread: Re: Correct way to specify anchors with NSURL?
  • Next by thread: Re: Correct way to specify anchors with NSURL?
  • Index(es):
    • Date
    • Thread