0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 16:31:53 +00:00

Test for catastrophic backtracking.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
Edward Z. Yang 2017-03-06 23:26:55 -08:00
parent 564af61809
commit 5886326cd0

View File

@ -256,6 +256,12 @@ text-align:center
$this->assertCleanCSS("a .foo #ID div.cl#foo {\nbackground:url(\"http://foo/BAR\")\n}"); $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 // vim: et sw=4 sts=4