Merge "Prefer using plaintextParams instead of rawParams where possible"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 31 Oct 2017 09:22:39 +0000 (09:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 31 Oct 2017 09:22:39 +0000 (09:22 +0000)
1  2 
includes/specials/SpecialUndelete.php

@@@ -969,12 -969,12 +969,12 @@@ class SpecialUndelete extends SpecialPa
                        $key = urlencode( $row->fa_storage_key );
                        $pageLink = $this->getFileLink( $file, $this->getPageTitle(), $ts, $key );
                } else {
 -                      $pageLink = $this->getLanguage()->userTimeAndDate( $ts, $user );
 +                      $pageLink = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
                }
                $userLink = $this->getFileUser( $file );
                $data = $this->msg( 'widthheight' )->numParams( $row->fa_width, $row->fa_height )->text();
                $bytes = $this->msg( 'parentheses' )
-                       ->rawParams( $this->msg( 'nbytes' )->numParams( $row->fa_size )->text() )
+                       ->plaintextParams( $this->msg( 'nbytes' )->numParams( $row->fa_size )->text() )
                        ->plain();
                $data = htmlspecialchars( $data . ' ' . $bytes );
                $comment = $this->getFileComment( $file );
                $time = $this->getLanguage()->userTimeAndDate( $ts, $user );
  
                if ( !$file->userCan( File::DELETED_FILE, $user ) ) {
 -                      return '<span class="history-deleted">' . $time . '</span>';
 +                      return '<span class="history-deleted">' . htmlspecialchars( $time ) . '</span>';
                }
  
                $link = $this->getLinkRenderer()->makeKnownLink(