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