3 class HTMLPurifier_HTMLModule_ScriptingTest
extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
9 $this->config
->set('HTML.Trusted', true);
10 $this->config
->set('Output.CommentScriptContents', false);
13 public function testDefaultRemoval()
15 $this->config
->set('HTML.Trusted', false);
17 '<script type="text/javascript">foo();</script>', ''
21 public function testPreserve()
24 '<script type="text/javascript">foo();</script>'
28 public function testCDATAEnclosure()
31 '<script type="text/javascript">//<![CDATA[
32 alert("<This is compatible with XHTML>");
37 public function testAllAttributes()
43 type="text/javascript"
48 public function testUnsupportedAttributes()
52 type="text/javascript"
55 '<script type="text/javascript">PCDATA</script>'