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
*/
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() );