X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXml.php;h=40be80bc5beae1c8223e48829fe8b2e6d0edb167;hb=2e1b3f94ad3620c87d8f5587576628a56556054e;hp=10d0d8b913184a9b5c2b13c26bb21441e0028218;hpb=a482757d6d646691e2669bd9471c979f45a7582e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Xml.php b/includes/Xml.php index 10d0d8b913..40be80bc5b 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; @@ -124,11 +124,11 @@ class Xml { * content you have is already valid xml. * * @param string $element Element name - * @param array $attribs Array of attributes + * @param array|null $attribs Array of attributes * @param string $contents Content of the element * @return string */ - public static function tags( $element, $attribs = null, $contents ) { + public static function tags( $element, $attribs, $contents ) { return self::openElement( $element, $attribs ) . $contents . ""; } @@ -382,7 +382,7 @@ class Xml { $value = false, $attribs = [] ) { list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs ); - return $label . ' ' . $input; + return $label . "\u{00A0}" . $input; } /** @@ -420,7 +420,7 @@ class Xml { public static function checkLabel( $label, $name, $id, $checked = false, $attribs = [] ) { global $wgUseMediaWikiUIEverywhere; $chkLabel = self::check( $name, $checked, [ 'id' => $id ] + $attribs ) . - ' ' . + "\u{00A0}" . self::label( $label, $id, $attribs ); if ( $wgUseMediaWikiUIEverywhere ) { @@ -446,7 +446,7 @@ class Xml { $checked = false, $attribs = [] ) { return self::radio( $name, $value, $checked, [ 'id' => $id ] + $attribs ) . - ' ' . + "\u{00A0}" . self::label( $label, $id, $attribs ); }