diff --git a/NEWS b/NEWS index f280ddbc..b6810df5 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier # Definitions (esp. HTMLDefinition) are now cached for a significant performance boost. You can disable caching by setting %Core.DefinitionCache to null. +# Contents between ', 'foo();' + '', '' ); // enabled diff --git a/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php b/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php index 52a87753..5d6c03f8 100644 --- a/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php +++ b/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php @@ -25,6 +25,17 @@ class HTMLPurifier_Strategy_RemoveForeignElementsTest 'BlingBong' ); + $this->assertResult( + '', + '' + ); + + $this->assertResult( + '', + 'alert();', + array('Core.RemoveScriptContents' => false) + ); + $this->assertResult( '
  • Item 1
  • ', '' diff --git a/tests/HTMLPurifierTest.php b/tests/HTMLPurifierTest.php index 98ed0779..d39be235 100644 --- a/tests/HTMLPurifierTest.php +++ b/tests/HTMLPurifierTest.php @@ -76,7 +76,7 @@ class HTMLPurifierTest extends UnitTestCase $this->purifier->purifyArray( array('Good', 'Sketchy', 'foo' => '') ), - array('Good', 'Sketchy', 'foo' => 'bad') + array('Good', 'Sketchy', 'foo' => '') ); $this->assertIsA($this->purifier->context, 'array');