From: Bartosz DziewoƄski Date: Mon, 19 Sep 2016 16:02:06 +0000 (+0200) Subject: Html: Update list of $voidElements X-Git-Tag: 1.31.0-rc.0~5480^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=d48c33e89835b1dcf8b8d50f473778c5ee3bbd54;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ] ];