1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Supported hundreds of nested HTML (#202)

* Supported hundreds of nested HTML (#201)

* Add Core.AllowParseManyTags
This commit is contained in:
msuzuki
2019-07-15 02:15:31 +09:00
committed by Edward Z. Yang
parent 524cd08a59
commit 8c153eef3a
8 changed files with 42 additions and 2 deletions

View File

@@ -384,6 +384,21 @@ a[href|title]
$this->config->getHTMLDefinition();
}
public function test_manyNestedTags()
{
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.AllowParseManyTags', true);
$purifier = new HTMLPurifier($config);
$input = 'I am inside a lot of tags';
for ($i = 0; $i < 300; $i++) {
$input = '<div>' . $input . '</div>';
}
$output = $purifier->purify($input);
$this->assertIdentical($input, $output);
}
}
// vim: et sw=4 sts=4