AliSoftware / OHAttributedLabel

UILabel that supports NSAttributedString
https://github.com/AliSoftware/OHAttributedLabel/wiki
1.51k stars 344 forks source link

Unable to parse ul li HTML tags #186

Closed swalehapatanwala closed 9 years ago

swalehapatanwala commented 9 years ago

HTML ul li tags are not parsed in this library. How can the library support ul li tags and other html elements?

AliSoftware commented 9 years ago

OHAttributedLabel has been deprecated for some time now (see the README), and isn't maintained anymore. Besides, as stated in the documentation, at that time the TagParsers were only very simplistic commodity builders not intended for a full HTML parser.

I strongly suggest you follow the alternatives listed in the depreciation warning in the README and migrate away from OHAttributedLabel.
The most common solution being to simply directly use UILabel (or UITextView) with both support NSAttributedStrings natively since iOS6, and use OHAttributedStringAdditions for additional commodity methods. (Other solutions are listed in the README if needed)

OHAttributedStringAdditions contains, among other things, a method to build an NSAttributedString from safe HTML, and this one supports ul and li and much more HTML tags.