mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Test for catastrophic backtracking.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
parent
564af61809
commit
5886326cd0
@ -256,6 +256,12 @@ text-align:center
|
||||
$this->assertCleanCSS("a .foo #ID div.cl#foo {\nbackground:url(\"http://foo/BAR\")\n}");
|
||||
}
|
||||
|
||||
public function test_extractStyleBlocks_backtracking()
|
||||
{
|
||||
$goo = str_repeat("a", 1000000); // 1M to trigger, sometimes it's less!
|
||||
$this->assertExtractStyleBlocks("<style></style>" . $goo, $goo, array(''));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Loading…
Reference in New Issue
Block a user