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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user