X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FXml.php;h=b368a131cafc46c228b70c46423b3b020fd496db;hp=d1a56bf78e6dd10df5d9fcefbb93d13c2b9946d6;hb=82bd6b026ef6ecb7f2fe15acaa40c608680dfff1;hpb=1dee28cb5f1efd6d9e14d6cc1d0c73c3f69269b4 diff --git a/includes/Xml.php b/includes/Xml.php index d1a56bf78e..b368a131ca 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; } @@ -268,7 +266,7 @@ class Xml { /** * Convenience function to build an HTML text input field * @param string $name Value of the name attribute - * @param int $size Value of the size attribute + * @param int|false $size Value of the size attribute * @param mixed $value Value of the value attribute * @param array $attribs Other attributes * @return string HTML @@ -291,7 +289,7 @@ class Xml { /** * Convenience function to build an HTML password input field * @param string $name Value of the name attribute - * @param int $size Value of the size attribute + * @param int|false $size Value of the size attribute * @param mixed $value Value of the value attribute * @param array $attribs Other attributes * @return string HTML @@ -602,7 +600,7 @@ class Xml { * * @param string|bool $legend Legend of the fieldset. If evaluates to false, * legend is not added. - * @param string $content Pre-escaped content for the fieldset. If false, + * @param string|false $content Pre-escaped content for the fieldset. If false, * only open fieldset is returned. * @param array $attribs Any attributes to fieldset-element. *