• 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: NSString and decoding HTML Entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString and decoding HTML Entities


  • Subject: Re: NSString and decoding HTML Entities
  • From: Bryan Henry <email@hidden>
  • Date: Sun, 05 Apr 2009 16:24:52 -0400

The HTML entities that Stuart is talking about aren't "percent escapes", and aren't replaced by - stringByReplacingPercentEscapesUsingEncoding:.

- Bryan

On Apr 5, 2009, at 4:19 PM, Jack Carbaugh wrote:

Why don't you just use the features of NSString ?

stringByReplacingPercentEscapesUsingEncoding:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ /apple_ref/doc/uid/20000154-BCIECHFE

On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote:

I need to convert strings that contain HTML entities (e.g., &#8217; or &#gt;). I can't seem to find an NSString method to do so (not that I sometimes don't easily miss the obvious). So, I created a category on NSString and made two trivial methods that take advantage of toll-free bridging between NSString and CFStringRef by using CFXMLCreateStringByEscapingEntities and CFXMLCreateStringByUnescapingEntities. Is there a better way?
_______________________________________________


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

_______________________________________________

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

_______________________________________________

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: 
 >NSString and decoding HTML Entities (From: Stuart Malin <email@hidden>)
 >Re: NSString and decoding HTML Entities (From: Jack Carbaugh <email@hidden>)

  • Prev by Date: crash reading archive
  • Next by Date: Re: NSString and decoding
  • Previous by thread: Re: NSString and decoding HTML Entities
  • Next by thread: Re: NSString and decoding HTML Entities
  • Index(es):
    • Date
    • Thread