From 0edd6983ba69e8195fa7cade96eca27df9ebf237 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 5 Mar 2013 09:06:02 +0100 Subject: Update to MediaWiki 1.20.3 --- tests/phpunit/includes/HtmlTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/phpunit/includes/HtmlTest.php') diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index a18f7922..135ebc5a 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -565,4 +565,16 @@ class HtmlTest extends MediaWikiTestCase { return $ret; } + public function testFormValidationBlacklist() { + $this->assertEmpty( + Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 2 ) ), + 'Blacklist form validation attributes.' + ); + $this->assertEquals( + ' step="any"', + Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 'any' ) ), + "Allow special case 'step=\"any\"'." + ); + } + } -- cgit v1.2.2