Wondering if there is an easy way to do a simple HTML escape/unescape in Objective C. What I want is something like this psuedo code:
NSString *string = @'<span>Foo</span>'; [string stringByUnescapingHTML];
Which returns
<span>Foo</span>
Hopefully unescaping all other HTML entities as well and even ASCII codes like Ӓ and the like.
Is there any methods in Cocoa Touch/UIKit to do this?
This link contains the solution below. Cocoa CF has the CFXMLCreateStringByUnescapingEntities function but that’s not available on the iPhone.