0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-20 03:05:18 +00:00
htmlpurifier/library/HTMLPurifier.php

56 lines
1.4 KiB
PHP
Raw Normal View History

<?php
/*!
* @mainpage
*
* HTMLPurifier is a purification class that will take an arbitrary snippet of
* HTML and rigorously test, validate and filter it into a version that
* is safe for output onto webpages. It achieves this by:
*
* -# Lexing (parsing into tokens) the document,
* -# Executing various strategies on the tokens:
* -# Removing all elements not in the whitelist,
* -# Making the tokens well-formed,
* -# Fixing the nesting of the nodes, and
* -# Validating attributes of the nodes; and
* -# Generating HTML from the purified tokens.
*
* See /docs/spec.txt for more details.
*/
require_once 'HTMLPurifier/Lexer.php';
require_once 'HTMLPurifier/Definition.php';
require_once 'HTMLPurifier/Generator.php';
/**
* Main library execution class.
*
* Facade that performs calls to the HTMLPurifier_Lexer,
* HTMLPurifier_Strategy and HTMLPurifier_Generator subsystems in order to
* purify HTML.
*/
class HTMLPurifier
{
/**
* Initializes the purifier.
* @param $config Configuration for all instances of the purifier
*/
function HTMLPurifier($config = null) {
// unimplemented
}
/**
* Purifies HTML.
*
* @param $html String of HTML to purify
* @param $config HTMLPurifier_Config object for this specific round
* @return Purified HTML
*/
function purify($html, $config = null) {
// unimplemented
}
}
?>