X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXml.php;h=4f2720ed859e299b6a2086201f198bf9bcb46d5d;hb=95627eb03d7534efee84bbea642699b54a72e5db;hp=b20f66ef1c0413b09dca529fa4cd23b65c1e058f;hpb=6f680554ceb988f3895184167d5006d722a0afb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Xml.php b/includes/Xml.php index b20f66ef1c..4f2720ed85 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -49,7 +49,7 @@ class Xml { if ( $allowShortTag && $contents === '' ) { $out .= ' />'; } else { - $out .= '>' . htmlspecialchars( $contents ) . ""; + $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . ""; } } return $out; @@ -160,8 +160,9 @@ class Xml { } /** - * @param int $year - * @param int $month + * @param int|string $year Use '' or 0 to start with no year preselected. + * @param int|string $month A month in the 1..12 range. Use '', 0 or -1 to start with no month + * preselected. * @return string Formatted HTML */ public static function dateMenu( $year, $month ) { @@ -213,10 +214,10 @@ class Xml { // a custom language code might not have a defined name... if ( !array_key_exists( $wgLanguageCode, $languages ) ) { $languages[$wgLanguageCode] = $wgLanguageCode; + // Sort the array again + ksort( $languages ); } - ksort( $languages ); - /** * If a bogus value is set, default to the content language. * Otherwise, no default is selected and the user ends up