diff --git a/Definition.php b/Definition.php index e0a17fd5..e64ba925 100644 --- a/Definition.php +++ b/Definition.php @@ -1,5 +1,10 @@ lexer->tokenizeHTML($html); $tokens = $this->definition->purifyTokens($tokens); return $this->generator->generateFromTokens($tokens); - } } diff --git a/Lexer.php b/Lexer.php index b83b2458..0232d9a3 100644 --- a/Lexer.php +++ b/Lexer.php @@ -12,6 +12,8 @@ TODO: */ +require_once 'HTMLPurifier/Token.php'; + class HTMLPurifier_Lexer { diff --git a/TODO.txt b/TODO.txt index e7f47ca4..ec6758f2 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,7 +6,6 @@ Primary: Secondary: - Build an automated release system that will create minimal versions too - Build system that will in-line includes -- Set up the file includes - Migrate all unit tests to use the lexer and generator - Build the entity lookup table diff --git a/benchmarks/HTML_Lexer.php b/benchmarks/HTML_Lexer.php index 52ce2ee9..105b3156 100644 --- a/benchmarks/HTML_Lexer.php +++ b/benchmarks/HTML_Lexer.php @@ -4,13 +4,15 @@ set_time_limit(5); +// emulates inserting a dir called HTMLPurifier into your class dir +set_include_path(get_include_path() . PATH_SEPARATOR . '../../'); + // PEAR require_once 'Benchmark/Timer.php'; require_once 'XML/HTMLSax3.php'; require_once 'Text/Password.php'; -require_once '../Token.php'; -require_once '../Lexer.php'; +require_once 'HTMLPurifier/Lexer.php'; class TinyTimer extends Benchmark_Timer { diff --git a/tests/ChildDef.php b/tests/ChildDef.php index a46147ea..ea9a21c9 100644 --- a/tests/ChildDef.php +++ b/tests/ChildDef.php @@ -1,5 +1,9 @@ addTestFile('HTMLPurifier.php');