From: Kevin Israel Date: Mon, 9 Jul 2018 02:27:52 +0000 (-0400) Subject: Web installer: Correctly escape U+00A0 NO-BREAK SPACE X-Git-Tag: 1.34.0-rc.0~4847^2 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24admin_url%7Dmembres/import.php?a=commitdiff_plain;h=7a4df753fd1f202f6679b501bb6166ed7aba4074;p=lhc%2Fweb%2Fwiklou.git Web installer: Correctly escape U+00A0 NO-BREAK SPACE Unicode escape sequences cannot be used in single quoted strings, in which they are treated as literal text. Follows-up 125cbd8c017b872c. Change-Id: Ife53a613a801b8bb96542b42fd3d2bb3dccaf629 --- diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 4142e6f266..e1210d836b 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -758,7 +758,7 @@ class WebInstaller extends Installer { */ public function label( $msg, $forId, $contents, $helpData = "" ) { if ( strval( $msg ) == '' ) { - $labelText = '\u{00A0}'; + $labelText = "\u{00A0}"; } else { $labelText = wfMessage( $msg )->escaped(); } @@ -1047,7 +1047,7 @@ class WebInstaller extends Installer { $items[$value] = Xml::radio( $params['controlName'], $value, $checked, $itemAttribs ) . - '\u{00A0}' . + "\u{00A0}" . Xml::tags( 'label', [ 'for' => $id ], $this->parse( isset( $params['itemLabels'] ) ? wfMessage( $params['itemLabels'][$value] )->plain() : diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 7f0d27d390..382ed3bf8d 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -412,7 +412,7 @@ class WebInstallerOptions extends WebInstallerPage { return '

' . Html::element( 'img', [ 'src' => $this->getVar( 'wgRightsIcon' ) ] ) . - '\u{00A0}\u{00A0}' . + "\u{00A0}\u{00A0}" . htmlspecialchars( $this->getVar( 'wgRightsText' ) ) . "

\n" . "

" .