htmLawed is a PHP script that makes input text more secure, HTML standards-compliant, and suitable in general from the viewpoint of a Web-page administrator, for use in the body of HTML 4 or XHTML 1 or 1.1 documents. It is a customizable HTML/XHTML filter, processor, purifier, and sanitizer. It can ensure that HTML tags are balanced and properly nested tags, neutralize code that may be used for cross-site scripting (XSS) attacks, and limit the allowed HTML elements, tags, attributes, or URL protocols.
Phptempt is a template engine for PHP and Java. Templates are precompiled and then included to the script/Java program as a PHP script/Java program. Templates are organized in blocks and placeholders, all placed in one single file. Blocks may be recursive. A version of the engine is available that is optimized for Java and particularly useful for the creation of code generators of any kind.
BlockTemplate is a class that implements a template engine based on the concept of blocks. The template files do not define looping logic, only variables or parameters to be replaced, to avoid using programming concepts that are not easy for designers to understand. The class supports event driven callback functions for customizing the template engine behavior.
The Simple HTML Parser is a fast HTML parser for PHP 5 that might be described as a stream parser. It divides HTML into nodes (tags, text, or comments) and returns them one at a time in the order they appear in the source. It was inspired by HTML Parser for PHP-4 but was written from the ground up with speed as the primary goal.