Merge "Add urlencode for URL encoding of lang values"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 26 Jul 2017 14:23:16 +0000 (14:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Jul 2017 14:23:17 +0000 (14:23 +0000)
includes/specialpage/LoginSignupSpecialPage.php

index 5c048a2..0600642 100644 (file)
@@ -761,7 +761,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                if ( $this->showCreateAccountLink() ) {
                        # Pass any language selection on to the mode switch link
                        if ( $this->mLanguage ) {
-                               $linkq .= '&uselang=' . $this->mLanguage;
+                               $linkq .= '&uselang=' . urlencode( $this->mLanguage );
                        }
                        // Supply URL, login template creates the button.
                        $template->set( 'createOrLoginHref', $titleObj->getLocalURL( $linkq ) );
@@ -1149,7 +1149,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                                $linkq = $this->getReturnToQueryStringFragment();
                                // Pass any language selection on to the mode switch link
                                if ( $this->mLanguage ) {
-                                       $linkq .= '&uselang=' . $this->mLanguage;
+                                       $linkq .= '&uselang=' . urlencode( $this->mLanguage );
                                }
                                $loggedIn = $this->getUser()->isLoggedIn();