SpecialNuke: use Message::plaintextParams() for page titles

So that their contents do not get parsed

Bug: T304777
Change-Id: I6f031d1b857ee0955b8966f5f63c63e269306568
This commit is contained in:
DannyS712 2022-03-27 00:33:29 +00:00
parent bfe4c13c0b
commit 6620e7e686

View file

@ -386,9 +386,13 @@ class SpecialNuke extends SpecialPage {
$deletionResult = false; $deletionResult = false;
if ( !$this->hookRunner->onNukeDeletePage( $title, $reason, $deletionResult ) ) { if ( !$this->hookRunner->onNukeDeletePage( $title, $reason, $deletionResult ) ) {
if ( $deletionResult ) { if ( $deletionResult ) {
$res[] = $this->msg( 'nuke-deleted', $title->getPrefixedText() )->parse(); $res[] = $this->msg( 'nuke-deleted' )
->plaintextParams( $title->getPrefixedText() )
->parse();
} else { } else {
$res[] = $this->msg( 'nuke-not-deleted', $title->getPrefixedText() )->parse(); $res[] = $this->msg( 'nuke-not-deleted' )
->plaintextParams( $title->getPrefixedText() )
->parse();
} }
continue; continue;
} }
@ -426,11 +430,17 @@ class SpecialNuke extends SpecialPage {
} }
if ( $status == 'job' ) { if ( $status == 'job' ) {
$res[] = $this->msg( 'nuke-deletion-queued', $title->getPrefixedText() )->parse(); $res[] = $this->msg( 'nuke-deletion-queued' )
->plaintextParams( $title->getPrefixedText() )
->parse();
} elseif ( $status->isOK() ) { } elseif ( $status->isOK() ) {
$res[] = $this->msg( 'nuke-deleted', $title->getPrefixedText() )->parse(); $res[] = $this->msg( 'nuke-deleted' )
->plaintextParams( $title->getPrefixedText() )
->parse();
} else { } else {
$res[] = $this->msg( 'nuke-not-deleted', $title->getPrefixedText() )->parse(); $res[] = $this->msg( 'nuke-not-deleted' )
->plaintextParams( $title->getPrefixedText() )
->parse();
} }
} }