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