Merge "Fix enhanced RC data attribute sanitizing"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 21 Jun 2017 19:38:48 +0000 (19:38 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 21 Jun 2017 19:38:48 +0000 (19:38 +0000)
1  2 
includes/changes/EnhancedChangesList.php

@@@ -243,7 -243,8 +243,7 @@@ class EnhancedChangesList extends Chang
                        $text = $userlink;
                        $text .= $this->getLanguage()->getDirMark();
                        if ( $count > 1 ) {
 -                              // @todo FIXME: Hardcoded '×'. Should be a message.
 -                              $formattedCount = $this->getLanguage()->formatNum( $count ) . '×';
 +                              $formattedCount = $this->msg( 'ntimes' )->numParams( $count )->escaped();
                                $text .= ' ' . $this->msg( 'parentheses' )->rawParams( $formattedCount )->escaped();
                        }
                        array_push( $users, $text );
                }
                $attribs = $data['attribs'];
                unset( $data['attribs'] );
-               $attribs = wfArrayFilterByKey( $attribs, [ Sanitizer::class, 'isReservedDataAttribute' ] );
+               $attribs = wfArrayFilterByKey( $attribs, function( $key ) {
+                       return $key === 'class' || Sanitizer::isReservedDataAttribute( $key );
+               } );
  
                $line = Html::openElement( 'table', $attribs ) . Html::openElement( 'tr' );
                $line .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';