mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Forms implementation for %HTML.Trusted. Some backend changes:
* Added Charsets and Character attribute types * Fix a heavily recursive form of ContentSets, this allows a content-set to include another content-set which includes another content-set, and so forth. Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -69,5 +69,20 @@ class HTMLPurifier_ChildDef_CustomTest extends HTMLPurifier_ChildDefHarness
|
||||
|
||||
}
|
||||
|
||||
function testPcdata() {
|
||||
$this->obj = new HTMLPurifier_ChildDef_Custom('#PCDATA,a');
|
||||
$this->assertEqual($this->obj->elements, array('#PCDATA' => true, 'a' => true));
|
||||
$this->assertResult('foo<a />');
|
||||
$this->assertResult('<a />', false);
|
||||
}
|
||||
|
||||
function testWhitespace() {
|
||||
$this->obj = new HTMLPurifier_ChildDef_Custom('a');
|
||||
$this->assertEqual($this->obj->elements, array('a' => true));
|
||||
$this->assertResult('foo<a />', false);
|
||||
$this->assertResult('<a />');
|
||||
$this->assertResult(' <a />');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -67,8 +67,6 @@ class HTMLPurifier_ChildDef_RequiredTest extends HTMLPurifier_ChildDefHarness
|
||||
'Out <b>Bold text</b><img />',
|
||||
'Out <b>Bold text</b><img />'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user