Re: NSString and decoding HTML Entities
Re: NSString and decoding HTML Entities
- Subject: Re: NSString and decoding HTML Entities
- From: Stuart Malin <email@hidden>
- Date: Sun, 5 Apr 2009 10:35:33 -1000
On Apr 5, 2009, at 10:19 AM, I. Savant wrote:
On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote:
I need to convert strings that contain HTML entities (e.g.,
’ or &#gt;).
To what?
If you want it to be an attributed string, there's always the -
[NSAttributedString initWithHTML:...] methods (in the
NSAttributedString AppKit additions). If you just want to strip the
HTML, you can then ask the attributed string for its -string ...
The source is not HTML tagged, but contains HTML entities.
see:
http://www.w3schools.com/tags/ref_entities.asp
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
So, for instance, I want to convert "-->" to "-->"
No need for an attributed string.
_______________________________________________
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