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:
@@ -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>'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user