htmLawed is a highly customizable single-file PHP script to make text secure, and standard- and admin policy-compliant for use in the body of HTML 4, XHTML 1 or 1.1, or generic XML documents. It is
... [More]
thus a configurable input (X)HTML filter, processor, purifier, sanitizer, beautifier, etc., and an alternative to the HTMLTidy application.
* make HTML markup in text more secure and standard-compliant
* processed text can be used in HTML, XHTML or XML documents
* restrict HTML elements, attributes, protocols, etc.
* balance tags, check element nesting, transform deprecated attributes and tags, convert relative to absolute URLs, etc.
* highly customizable
* single file of ~45 kb
* simple HTML Tidy alternative
* use to filter & sanitize HTML code submitted in blog comments, forum posts, etc., generate XML-compatible feed items from web-page excerpts, make old HTML code XHTML-compliant, pretty-print HTML, scrape web-pages, and so on [Less]