This is done by treating the messages as wikitext rather than plain
text
Bug: T142406
Change-Id: I5342b9491df47bbb549e91ebba9d0a8b273a7d17
$links[] = Html::rawElement(
'span',
$attribs,
- $this->msg( $msg )->rawParams( $link )->escaped()
+ $this->msg( $msg )->rawParams( $link )->parse()
);
}
return Html::rawElement(
'span',
$attribs,
- Xml::checkLabel(
- $this->msg( $message, '' )->text(),
- $name,
- $name,
- (int)$value
+ // not using Html::checkLabel because that would escape the contents
+ Html::check( $name, (int)$value, [ 'id' => $name ] ) . Html::rawElement(
+ 'label',
+ $attribs + [ 'for' => $name ],
+ // <nowiki/> at beginning to avoid messages with "$1 ..." being parsed as pre tags
+ $this->msg( $message, '<nowiki/>' )->parse()
)
);
}