r106967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106966‎ | r106967 | r106968 >
Date:19:17, 21 December 2011
Author:brion
Status:ok
Tags:
Comment:
Code style: move a couple htmlspecialchars() down to usage so it's clear where escaping happens
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -1267,14 +1267,14 @@
12681268 */
12691269 function getPageLink( $rev, $titleObj, $ts ) {
12701270 $user = $this->getUser();
1271 - $time = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
 1271+ $time = $this->getLanguage()->userTimeAndDate( $ts, $user );
12721272
12731273 if( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
12741274 return '<span class="history-deleted">' . $time . '</span>';
12751275 } else {
12761276 $link = Linker::linkKnown(
12771277 $titleObj,
1278 - $time,
 1278+ htmlspecialchars( $time ),
12791279 array(),
12801280 array(
12811281 'target' => $this->mTargetObj->getPrefixedText(),
@@ -1296,14 +1296,14 @@
12971297 */
12981298 function getFileLink( $file, $titleObj, $ts, $key ) {
12991299 $user = $this->getUser();
1300 - $time = htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) );
 1300+ $time = $this->getLanguage()->userTimeAndDate( $ts, $user );
13011301
13021302 if( !$file->userCan( File::DELETED_FILE, $user ) ) {
13031303 return '<span class="history-deleted">' . $time . '</span>';
13041304 } else {
13051305 $link = Linker::linkKnown(
13061306 $titleObj,
1307 - $time,
 1307+ htmlspecialchars( $time ),
13081308 array(),
13091309 array(
13101310 'target' => $this->mTargetObj->getPrefixedText(),

Status & tagging log