This function takes in a block of HTML block, however messy, and runs it through the W3 Tidy utility to produce a clean version of it.
[W3 Tidy]
Contents |
HtmlTidy( htmlblock )
This function returns the cleaned up version of the text.
This function performs a series of clean up routines, including the removal of all extra tags MSWord inserts, removing duplicate/empty tags, lowering casing tag and attribute names, fixing poorly closed tags.
This is a very useful function for those that wish to pre-process user input forms that may result in some adding in HTML text that may break the rendering of your application. For example, inserting HTML into their display name in a CMS system.