From: Ricordisamoa Date: Wed, 18 Feb 2015 21:35:22 +0000 (+0100) Subject: Html::openElement: Don't omit closing tags. X-Git-Tag: 1.31.0-rc.0~12362^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=55fc61c4743d1caa5c54a12133bb8c68413c7ddc;p=lhc%2Fweb%2Fwiklou.git Html::openElement: Don't omit closing tags. Logic added with commit eefe1b13a382a7d11c2137bbf900b783ee445323 for both openElement and closeElement, removed with commit d950da075dcb6c6dd3f68a50a0d427569350763a but only from closeElement. Reported by Petr Bena on Wikitech-l: https://lists.wikimedia.org/pipermail/wikitech-l/2015-February/080861.html Change-Id: I6ed45763f7e95f7f39b73432e4f6152431891963 --- diff --git a/includes/Html.php b/includes/Html.php index 93a1a044e9..fe8f57ee9f 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -257,19 +257,11 @@ class Html { * @return string */ public static function openElement( $element, $attribs = array() ) { - global $wgWellFormedXml; $attribs = (array)$attribs; // This is not required in HTML5, but let's do it anyway, for // consistency and better compression. $element = strtolower( $element ); - // In text/html, initial and tags can be omitted under - // pretty much any sane circumstances, if they have no attributes. See: - // - if ( !$wgWellFormedXml && !$attribs && in_array( $element, array( 'html', 'head' ) ) ) { - return ''; - } - // Remove invalid input types if ( $element == 'input' ) { $validTypes = array(