X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXml.php;h=febf03e7a22fc453f7257c93713b7ce8820a340f;hb=a38af7ba26579bb3004f673e44d39710887763aa;hp=d1a56bf78e6dd10df5d9fcefbb93d13c2b9946d6;hpb=ecd0a5fce59fc40cc76ca29ebd9b5f4be1f1bfa0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Xml.php b/includes/Xml.php index d1a56bf78e..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; }