From 7a4df753fd1f202f6679b501bb6166ed7aba4074 Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Sun, 8 Jul 2018 22:27:52 -0400 Subject: [PATCH] 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 --- includes/installer/WebInstaller.php | 4 ++-- includes/installer/WebInstallerOptions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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" . "

" . -- 2.20.1