0

could you show me algorithm for implement decode special HTML entities in Objective C? any idea?

RAGOpoR
  • 8,118
  • 19
  • 64
  • 97
  • 1
    Already asked in http://stackoverflow.com/questions/1105169/html-character-decoding-in-objective-c-cocoa-touch and http://stackoverflow.com/questions/2364797/objective-c-how-to-replace-html-entities. – kennytm Mar 11 '10 at 06:46

1 Answers1

3

Check out my NSString category for HTML. Here are the methods available:

- (NSString *)stringByConvertingHTMLToPlainText;
- (NSString *)stringByDecodingHTMLEntities;
- (NSString *)stringByEncodingHTMLEntities;
- (NSString *)stringWithNewLinesAsBRs;
- (NSString *)stringByRemovingNewLinesAndWhitespace;
Michael Waterfall
  • 20,497
  • 27
  • 111
  • 168