1
0
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:
Sandro Miguel Marques
2019-07-14 19:10:33 +01:00
committed by Edward Z. Yang
parent abba77a80b
commit b91833877a
2 changed files with 17 additions and 3 deletions

View File

@@ -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();