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