From 6620e7e6865a0f00c036b941b37bdbdcfdc4c431 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Sun, 27 Mar 2022 00:33:29 +0000 Subject: [PATCH] SpecialNuke: use Message::plaintextParams() for page titles So that their contents do not get parsed Bug: T304777 Change-Id: I6f031d1b857ee0955b8966f5f63c63e269306568 --- includes/SpecialNuke.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/includes/SpecialNuke.php b/includes/SpecialNuke.php index c21c205f..1a49b29c 100644 --- a/includes/SpecialNuke.php +++ b/includes/SpecialNuke.php @@ -386,9 +386,13 @@ class SpecialNuke extends SpecialPage { $deletionResult = false; if ( !$this->hookRunner->onNukeDeletePage( $title, $reason, $deletionResult ) ) { if ( $deletionResult ) { - $res[] = $this->msg( 'nuke-deleted', $title->getPrefixedText() )->parse(); + $res[] = $this->msg( 'nuke-deleted' ) + ->plaintextParams( $title->getPrefixedText() ) + ->parse(); } else { - $res[] = $this->msg( 'nuke-not-deleted', $title->getPrefixedText() )->parse(); + $res[] = $this->msg( 'nuke-not-deleted' ) + ->plaintextParams( $title->getPrefixedText() ) + ->parse(); } continue; } @@ -426,11 +430,17 @@ class SpecialNuke extends SpecialPage { } 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() ) { - $res[] = $this->msg( 'nuke-deleted', $title->getPrefixedText() )->parse(); + $res[] = $this->msg( 'nuke-deleted' ) + ->plaintextParams( $title->getPrefixedText() ) + ->parse(); } else { - $res[] = $this->msg( 'nuke-not-deleted', $title->getPrefixedText() )->parse(); + $res[] = $this->msg( 'nuke-not-deleted' ) + ->plaintextParams( $title->getPrefixedText() ) + ->parse(); } }