From d48c33e89835b1dcf8b8d50f473778c5ee3bbd54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 19 Sep 2016 18:02:06 +0200 Subject: [PATCH] Html: Update list of $voidElements `` is nowhere to be found in current HTML5 specification. Scarce documentation on the internet hints that it has been removed. Change-Id: I2a704194c7e8f8ca307f9d97c7f47a47cfaf00a6 --- includes/Html.php | 4 +--- tests/phpunit/includes/HtmlTest.php | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/includes/Html.php b/includes/Html.php index 8c01448749..2ef891d168 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -46,13 +46,12 @@ * @since 1.16 */ class Html { - // List of void elements from HTML5, section 8.1.2 as of 2011-08-12 + // List of void elements from HTML5, section 8.1.2 as of 2016-09-19 private static $voidElements = [ 'area', 'base', 'br', 'col', - 'command', 'embed', 'hr', 'img', @@ -339,7 +338,6 @@ class Html { 'height' => '150', 'width' => '300', ], - 'command' => [ 'type' => 'command' ], 'form' => [ 'action' => 'GET', 'autocomplete' => 'on', diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index 85c95e4768..bc5096639b 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -514,10 +514,6 @@ class HtmlTest extends MediaWikiTestCase { 'canvas', [ 'width' => 300 ] ]; - $cases[] = [ '', - 'command', [ 'type' => 'command' ] - ]; - $cases[] = [ '
', 'form', [ 'action' => 'GET' ] ]; -- 2.20.1