Objective C HTML escape/unescape

Posted by Squeegy on Stack Overflow See other posts from Stack Overflow or by Squeegy
Published on 2009-03-18T18:43:23Z Indexed on 2010/04/09 0:43 UTC
Read the original article Hit count: 773

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?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone