HTMLawed

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 thus a configurable input (X)HTML filter, processor, purifier, sanitizer, beautifier, etc., and an alternative to the HTMLTidy application.

The lawing in of input text is needed to ensure that HTML code in the text is standard-compliant, does not introduce security vulnerabilities, and does not break the aesthetics, design or layout of web-pages. htmLawed tries to do this by, for example, making HTML well-formed with balanced and properly nested tags, neutralizing code that may be used for cross-site scripting (XSS) attacks, and allowing only specified HTML elements/tags and attributes.

htm / txt documentation
Input » (max. 8000 chars)
 Validator tools: Encoding:


Settings »

Use with a Javascript- and cookie-enabled, relatively new version of a common browser.

You can use text from this collection of test-cases in the input. Set the character encoding of the browser to Unicode/utf-8 before copying.

For more about the anti-XSS capability of htmLawed, see this page.

Submitted input will also be HTML-rendered (XHTML 1) after htmLawed-filtering.

Change Encoding to reflect the character encoding of the input text. Even then, it may not work or some characters may not display properly because of variable browser support and because of the form interface. Developers can write some PHP code to capture the filtered input to a file if this is important.

Refer to the htmLawed documentation (htm/txt) for details about Settings, and htmLawed's behavior and limitations.

For Settings, incorrectly-specified values like regular expressions are silently ignored. One or more settings form-fields may have been disabled. Some characters are not allowed in the Spec field.

Hovering the mouse over some of the text can provide additional information in some browsers.

Because of character-encoding issues, the W3C validator (anyway not perfect) may reject validation requests or invalidate otherwise-valid code, esp. if text was copy-pasted in the input box. Local applications like the HTML Validator Firefox browser add-on may be useful in such cases.

     
  Home - Free Web Tools - Free Website Builder - Free Site Submit - HTML Code SEO - Ping Blog -  
  imasterweb.com means free webmaster help. This website domain register and domain hosting are ponsored by Luckyregister.com - Cheap domain registration and cheap domain hosting services with great free extras  
  imasterweb.com© 2009 - free webmaster help