# Log timestamp
if ( $type == RC_LOG ) {
- $link = $rcObj->timestamp;
+ $link = htmlspecialchars( $rcObj->timestamp );
# Revision link
} elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
- $link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
+ $link = Html::element( 'span', [ 'class' => 'history-deleted' ], $rcObj->timestamp );
} else {
$link = $this->linkRenderer->makeKnownLink(
$rcObj->getTitle(),
- new HtmlArmor( $rcObj->timestamp ),
+ $rcObj->timestamp,
[],
$params
);
// skip entry if hook aborted it
return [];
}
- $attribs = wfArrayFilterByKey( $attribs, [ Sanitizer::class, 'isReservedDataAttribute' ] );
+ $attribs = array_filter( $attribs,
+ [ Sanitizer::class, 'isReservedDataAttribute' ],
+ ARRAY_FILTER_USE_KEY
+ );
$lineParams['recentChangesFlagsRaw'] = [];
if ( isset( $data['recentChangesFlags'] ) ) {
];
// timestamp is not really a link here, but is called timestampLink
// for consistency with EnhancedChangesListModifyLineData
- $data['timestampLink'] = $rcObj->timestamp;
+ $data['timestampLink'] = htmlspecialchars( $rcObj->timestamp );
# Article or log link
if ( $logType ) {
}
$attribs = $data['attribs'];
unset( $data['attribs'] );
- $attribs = wfArrayFilterByKey( $attribs, function ( $key ) {
+ $attribs = array_filter( $attribs, function ( $key ) {
return $key === 'class' || Sanitizer::isReservedDataAttribute( $key );
- } );
+ }, ARRAY_FILTER_USE_KEY );
$prefix = '';
if ( is_callable( $this->changeLinePrefixer ) ) {