X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fparser%2FSanitizerTest.php;h=1b67bbdf79f57ebbb2bd9e8cf6f82a5235d1d156;hp=f6061b8cc6cc29761bd7179d264c47cd9cd5f0ef;hb=214b37ff07f3fde89430297b2a857750a56ae205;hpb=d2b7662bbae2b6ff6599e72eb449cb2ce444e877 diff --git a/tests/phpunit/includes/parser/SanitizerTest.php b/tests/phpunit/includes/parser/SanitizerTest.php index f6061b8cc6..1b67bbdf79 100644 --- a/tests/phpunit/includes/parser/SanitizerTest.php +++ b/tests/phpunit/includes/parser/SanitizerTest.php @@ -101,6 +101,7 @@ class SanitizerTest extends MediaWikiTestCase { */ public function testRemovehtmltagsOnHtml5Tags( $tag, $escaped ) { $this->hideDeprecated( 'disabling tidy' ); + $this->hideDeprecated( 'MWTidy::setInstance' ); MWTidy::setInstance( false ); if ( $escaped ) { @@ -164,6 +165,7 @@ class SanitizerTest extends MediaWikiTestCase { */ public function testRemoveHTMLtags( $input, $output, $msg = null ) { $this->hideDeprecated( 'disabling tidy' ); + $this->hideDeprecated( 'MWTidy::setInstance' ); MWTidy::setInstance( false ); $this->assertEquals( $output, Sanitizer::removeHTMLtags( $input ), $msg ); } @@ -324,6 +326,7 @@ class SanitizerTest extends MediaWikiTestCase { ], [ '/* insecure input */', 'foo: attr( title, url );' ], [ '/* insecure input */', 'foo: attr( title url );' ], + [ '/* insecure input */', 'foo: var(--evil-attribute)' ], ]; } @@ -525,6 +528,7 @@ class SanitizerTest extends MediaWikiTestCase { ], [ '123', '123' ], [ '123', '123' ], + [ '12', '1 2' ], ]; }