1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

Implement EntityLookup and put in the Lexer. Some behavior was migrated, since it looks like it will have to be used in all Lexers, not just DirectLex (which is the only one that uses it).

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@105 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-07-23 21:07:30 +00:00
parent 7268987846
commit 5ce0ae7056
9 changed files with 196 additions and 54 deletions

View File

@@ -0,0 +1,29 @@
<?php
// this page is UTF-8 encoded!
require_once 'HTMLPurifier/EntityLookup.php';
class HTMLPurifier_EntityLookupTest extends UnitTestCase
{
function test() {
$lookup = HTMLPurifier_EntityLookup::instance();
// latin char
$this->assertIdentical('â', $lookup->table['acirc']);
// special char
$this->assertIdentical('"', $lookup->table['quot']);
$this->assertIdentical('“', $lookup->table['ldquo']);
$this->assertIdentical('<', $lookup->table['lt']); //expressed strangely
// symbol char
$this->assertIdentical('θ', $lookup->table['theta']);
}
}
?>