}
if ( is_null( $contents ) ) {
$out .= '>';
+ } elseif ( $allowShortTag && $contents === '' ) {
+ $out .= ' />';
} else {
- if ( $allowShortTag && $contents === '' ) {
- $out .= ' />';
- } else {
- $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . "</$element>";
- }
+ $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . "</$element>";
}
return $out;
}
/**
* 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
*/