X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FXml.php;h=febf03e7a22fc453f7257c93713b7ce8820a340f;hp=9744aeefcc028f0920fff30c92a64ca89e2d889f;hb=c13fee87d42bdd6fdf6764edb6f6475c14c27749;hpb=38a0733fef96fd2f837144293b902d2e0353c955 diff --git a/includes/Xml.php b/includes/Xml.php index 9744aeefcc..febf03e7a2 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -47,12 +47,10 @@ class Xml { } if ( is_null( $contents ) ) { $out .= '>'; + } elseif ( $allowShortTag && $contents === '' ) { + $out .= ' />'; } else { - if ( $allowShortTag && $contents === '' ) { - $out .= ' />'; - } else { - $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . ""; - } + $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . ""; } return $out; } @@ -454,7 +452,7 @@ class Xml { /** * Convenience function to build an HTML submit button * When $wgUseMediaWikiUIEverywhere is true it will default to a progressive button - * @param string $value Label text for the button + * @param string $value Label text for the button (unescaped) * @param array $attribs Optional custom attributes * @return string HTML */