From: Fomafix Date: Thu, 20 Sep 2018 13:16:11 +0000 (+0200) Subject: Block: Explicit convert Message to string X-Git-Tag: 1.34.0-rc.0~2577^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=a6a05adba1e9b1be274f36bf68de39678974793b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() );