1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

[1.3.0] Implement user-unfriendly implementation of Strict doctype. We will try not to ship this one.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@556 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-11-22 18:17:39 +00:00
parent b0575cb888
commit b152448608
3 changed files with 48 additions and 11 deletions

View File

@@ -14,11 +14,28 @@ class HTMLPurifier_Test extends UnitTestCase
$this->assertIdentical($expect, $result);
}
function test() {
$config = HTMLPurifier_Config::createDefault();
$this->purifier = new HTMLPurifier($config);
function testNull() {
$this->purifier = new HTMLPurifier();
$this->assertPurification("Null byte\0", "Null byte");
}
function testStrict() {
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML', 'Strict', true);
$this->purifier = new HTMLPurifier($config);
$this->assertPurification(
'<u>Illegal underline</u>',
'Illegal underline'
);
$this->assertPurification(
'<blockquote>Illegal contents</blockquote>',
'<blockquote></blockquote>'
);
}
}
?>