• 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: Converting from HTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting from HTML


  • Subject: Re: Converting from HTML
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 17 Oct 2008 10:22:44 +0100

On 17 Oct 2008, at 03:17, Drarok Ithaqua wrote:

Hi all, i'm trying to find a way to convert an HTML-originated URL into one I can use in cocoa.

Example input: <link type="application/rss+xml" rel="alternate" href="/search/unique&amp;stuff&amp;here" />

I know the URL that this data is fetched from, so I can prefix that to achieve a full URL again, but I need to convert the &amp;
into plain ampersands, but there could be all kinds of HTML characters in there. Is there a category on NSString out there I could
use for this?


Please, please, please don't try and append the unescaped string to the base URL. Cocoa has a full NSURL API for this sort of thing, so instead do:

NSURL *URL = [NSURL URLWithString:unescapedString relativeToURL:baseURL];

_______________________________________________

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: 
 >Converting from HTML (From: Drarok Ithaqua <email@hidden>)

  • Prev by Date: Re: How can I find app bundle with its identifier. App is not running.
  • Next by Date: Re: How can I find app bundle with its identifier. App is not running.
  • Previous by thread: Re: Converting from HTML
  • Next by thread: Re: Converting from HTML
  • Index(es):
    • Date
    • Thread