From a6a05adba1e9b1be274f36bf68de39678974793b Mon Sep 17 00:00:00 2001 From: Fomafix Date: Thu, 20 Sep 2018 15:16:11 +0200 Subject: [PATCH] Block: Explicit convert Message to string Without a converting method like ->parse(), ->escaped() or ->text() the method __toString() is used which is a equivalent to ->parse(). This change switches from ->parse() to ->text() and let Html::element do the HTML escaping, because the message 'autoblockid' is not needed to parse. Change-Id: I653906bdca0864989ffed5960505b96053456066 --- includes/Block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index 09f6d9f631..8eac6b6f9d 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1291,10 +1291,10 @@ class Block { */ public function getRedactedName() { if ( $this->mAuto ) { - return Html::rawElement( + return Html::element( 'span', [ 'class' => 'mw-autoblockid' ], - wfMessage( 'autoblockid', $this->mId ) + wfMessage( 'autoblockid', $this->mId )->text() ); } else { return htmlspecialchars( $this->getTarget() ); -- 2.20.1