mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Method purifyArray() updated (#143)
* Methof purifyArray() updated Now it works with multidimensional arrays * Add test case. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
committed by
Edward Z. Yang
parent
abba77a80b
commit
b91833877a
@@ -22,6 +22,16 @@ class HTMLPurifierTest extends HTMLPurifier_Harness
|
||||
|
||||
}
|
||||
|
||||
public function test_purifyArray_nested()
|
||||
{
|
||||
$this->assertIdentical(
|
||||
$this->purifier->purifyArray(
|
||||
array('Good', '<b>Sketchy', 'foo' => array('bar' => '<script>bad</script>'))
|
||||
),
|
||||
array('Good', '<b>Sketchy</b>', 'foo' => array('bar' => ''))
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetInstance()
|
||||
{
|
||||
$purifier = HTMLPurifier::getInstance();
|
||||
|
Reference in New Issue
Block a user