mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-08 00:12:52 +02:00
Rename HTML_Generator to HTMLPurifier_Generator.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@66 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class HTML_Generator
|
class HTMLPurifier_Generator
|
||||||
{
|
{
|
||||||
|
|
||||||
function generateFromTokens($tokens) {
|
function generateFromTokens($tokens) {
|
@ -10,7 +10,7 @@ class HTML_Purifier
|
|||||||
function HTML_Purifier() {
|
function HTML_Purifier() {
|
||||||
$this->lexer = new HTMLPurifier_Lexer();
|
$this->lexer = new HTMLPurifier_Lexer();
|
||||||
$this->definition = new PureHTMLDefinition();
|
$this->definition = new PureHTMLDefinition();
|
||||||
$this->generator = new HTML_Generator();
|
$this->generator = new HTMLPurifier_Generator();
|
||||||
}
|
}
|
||||||
|
|
||||||
function purify($html) {
|
function purify($html) {
|
||||||
|
@ -29,7 +29,7 @@ class PureHTMLDefinition
|
|||||||
);
|
);
|
||||||
|
|
||||||
function PureHTMLDefinition() {
|
function PureHTMLDefinition() {
|
||||||
$this->generator = new HTML_Generator();
|
$this->generator = new HTMLPurifier_Generator();
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
@ -506,7 +506,7 @@ class HTMLDTD_ChildDef_Simple extends HTMLDTD_ChildDef
|
|||||||
$elements = array_flip($elements);
|
$elements = array_flip($elements);
|
||||||
foreach ($elements as $i => $x) $elements[$i] = true;
|
foreach ($elements as $i => $x) $elements[$i] = true;
|
||||||
$this->elements = $elements;
|
$this->elements = $elements;
|
||||||
$this->gen = new HTML_Generator();
|
$this->gen = new HTMLPurifier_Generator();
|
||||||
}
|
}
|
||||||
function validateChildren() {
|
function validateChildren() {
|
||||||
trigger_error('Cannot call abstract function!', E_USER_ERROR);
|
trigger_error('Cannot call abstract function!', E_USER_ERROR);
|
||||||
|
@ -8,7 +8,7 @@ require_once 'HTML_Purifier.php';
|
|||||||
require_once 'Lexer.php';
|
require_once 'Lexer.php';
|
||||||
require_once 'Token.php';
|
require_once 'Token.php';
|
||||||
require_once 'PureHTMLDefinition.php';
|
require_once 'PureHTMLDefinition.php';
|
||||||
require_once 'HTML_Generator.php';
|
require_once 'Generator.php';
|
||||||
|
|
||||||
$test = new GroupTest('HTML_Purifier');
|
$test = new GroupTest('HTML_Purifier');
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ $test->addTestFile('HTML_Purifier.php');
|
|||||||
$test->addTestFile('Lexer.php');
|
$test->addTestFile('Lexer.php');
|
||||||
//$test->addTestFile('Token.php');
|
//$test->addTestFile('Token.php');
|
||||||
$test->addTestFile('PureHTMLDefinition.php');
|
$test->addTestFile('PureHTMLDefinition.php');
|
||||||
$test->addTestFile('HTML_Generator.php');
|
$test->addTestFile('Generator.php');
|
||||||
chdir('../');
|
chdir('../');
|
||||||
|
|
||||||
$test->run( new HtmlReporter() );
|
$test->run( new HtmlReporter() );
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Test_HTML_Generator extends UnitTestCase
|
class Test_HTMLPurifier_Generator extends UnitTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
var $gen;
|
var $gen;
|
||||||
|
|
||||||
function Test_HTML_Generator() {
|
function Test_HTMLPurifier_Generator() {
|
||||||
$this->UnitTestCase();
|
$this->UnitTestCase();
|
||||||
$this->gen = new HTML_Generator();
|
$this->gen = new HTMLPurifier_Generator();
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_generateFromToken() {
|
function test_generateFromToken() {
|
@ -8,7 +8,7 @@ class Test_HTMLDTD_ChildDef extends UnitTestCase
|
|||||||
|
|
||||||
function Test_HTMLDTD_ChildDef() {
|
function Test_HTMLDTD_ChildDef() {
|
||||||
$this->lex = new HTMLPurifier_Lexer();
|
$this->lex = new HTMLPurifier_Lexer();
|
||||||
$this->gen = new HTML_Generator();
|
$this->gen = new HTMLPurifier_Generator();
|
||||||
parent::UnitTestCase();
|
parent::UnitTestCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user