OpenBD Wiki

From OpenBD
Jump to: navigation, search

HtmlTidy()

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

Parameters

HtmlTidy( htmlblock )

  • htmlblock: this is html snippet or page

Returns

This function returns the cleaned up version of the text.

Notes

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.

Engine Compatibility

  • OpenBD 1.0+

Personal tools