jsoup is a Java library for working with real-world HTML. It can parse HTML from a URL, file, or string. It can find and extract data, using DOM traversal or CSS selectors. The HTML elements, attributes, and text can be manipulated. It can clean user-submitted content against a safe white-list. jsoup is designed to deal with all varieties of HTML found in the wild, from pristine and validating to invalid tag-soup; jsoup will create a sensible parse tree.
PHP Emoticon Parser can replace emoticon text with HTML image tags. It can search for emoticon text characters in a given text string and replace them with equivalent emoticon images. The emoticon text and image mappings are defined in a separate script that maps emoticon names to the different equivalent representations for emoticon text symbols.
MightyString adds array functionality and other tools for Ruby strings, including matching, indexing, substitution, and deletion. MightyString::HTML.strip_html provides more ideal HTML-to-ASCII formatting output. This is an advanced block "filtering" module. It works very well, with extremely rare cases which fall through its fingers.