Don't escape the mail's subject in Special:PasswordReset
[lhc/web/wiklou.git] / includes / specials / SpecialPasswordReset.php
index 69c4056..082eed0 100644 (file)
@@ -105,6 +105,15 @@ class SpecialPasswordReset extends FormSpecialPage {
        public function alterForm( HTMLForm $form ) {
                global $wgPasswordResetRoutes;
 
+               $form->setDisplayFormat( 'vform' );
+               // Turn the old-school line around the form off.
+               // XXX This wouldn't be necessary here if we could set the format of
+               // the HTMLForm to 'vform' at its creation, but there's no way to do so
+               // from a FormSpecialPage class.
+               $form->setWrapperLegend( false );
+
+               $form->addHiddenFields( $this->getRequest()->getValues( 'returnto', 'returntoquery' ) );
+
                $i = 0;
                if ( isset( $wgPasswordResetRoutes['username'] ) && $wgPasswordResetRoutes['username'] ) {
                        $i++;
@@ -268,7 +277,7 @@ class SpecialPasswordReset extends FormSpecialPage {
 
                $title = $this->msg( 'passwordreset-emailtitle' );
 
-               $this->result = $firstUser->sendMail( $title->escaped(), $this->email->text() );
+               $this->result = $firstUser->sendMail( $title->text(), $this->email->text() );
 
                if ( isset( $data['Capture'] ) && $data['Capture'] ) {
                        // Save the user, will be used if an error occurs when sending the email