NSString and decoding HTML Entities
NSString and decoding HTML Entities
- Subject: NSString and decoding HTML Entities
- From: Stuart Malin <email@hidden>
- Date: Sun, 5 Apr 2009 09:56:53 -1000
I need to convert strings that contain HTML entities (e.g., ’
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