Web installer: Correctly escape U+00A0 NO-BREAK SPACE
authorKevin Israel <pleasestand@live.com>
Mon, 9 Jul 2018 02:27:52 +0000 (22:27 -0400)
committerKevin Israel <pleasestand@live.com>
Mon, 9 Jul 2018 03:16:22 +0000 (23:16 -0400)
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
includes/installer/WebInstallerOptions.php

index 4142e6f..e1210d8 100644 (file)
@@ -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() :
index 7f0d27d..382ed3b 100644 (file)
@@ -412,7 +412,7 @@ class WebInstallerOptions extends WebInstallerPage {
 
                return '<p>' .
                        Html::element( 'img', [ 'src' => $this->getVar( 'wgRightsIcon' ) ] ) .
-                       '\u{00A0}\u{00A0}' .
+                       "\u{00A0}\u{00A0}" .
                        htmlspecialchars( $this->getVar( 'wgRightsText' ) ) .
                        "</p>\n" .
                        "<p style=\"text-align: center;\">" .