Html: Update list of $voidElements
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 19 Sep 2016 16:02:06 +0000 (18:02 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 19 Sep 2016 16:26:28 +0000 (16:26 +0000)
`<command>` 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
tests/phpunit/includes/HtmlTest.php

index 8c01448..2ef891d 100644 (file)
  * @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',
index 85c95e4..bc50966 100644 (file)
@@ -514,10 +514,6 @@ class HtmlTest extends MediaWikiTestCase {
                        'canvas', [ 'width' => 300 ]
                ];
 
-               $cases[] = [ '<command/>',
-                       'command', [ 'type' => 'command' ]
-               ];
-
                $cases[] = [ '<form></form>',
                        'form', [ 'action' => 'GET' ]
                ];