- $text = $wgContLang->convert( $nt->getText() );
- $plink = $this->getLinkRenderer()->makeLink( $nt, $text );
+ $text = MediaWikiServices::getInstance()->getContentLanguage()
+ ->convert( htmlspecialchars( $nt->getText() ) );
+ $plink = $this->getLinkRenderer()->makeLink( $nt, new HtmlArmor( $text ) );