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

[3.1.0] Implement %HTML.Forbidden*

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1671 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-22 07:16:49 +00:00
parent d3710518ce
commit 4fe475c57f
9 changed files with 77 additions and 8 deletions

View File

@@ -53,6 +53,21 @@ class HTMLPurifierTest extends HTMLPurifier_Harness
}
function testBlacklistElements() {
$this->purifier = new HTMLPurifier(array(
'HTML.ForbiddenElements' => array('b'),
'HTML.ForbiddenAttributes' => array('a.href')
));
$this->assertPurification(
'<p>Par.</p>'
);
$this->assertPurification(
'<b>Pa<a href="foo">r</a>.</b>',
'Pa<a>r</a>.'
);
}
function testDifferentAllowedCSSProperties() {
$this->purifier = new HTMLPurifier(array(