* @ingroup Parser
*/
+use MediaWiki\MediaWikiServices;
+
/**
* HTML sanitizer for MediaWiki
* @ingroup Parser
* @return string Still normalized, without entities
*/
public static function decodeCharReferencesAndNormalize( $text ) {
- global $wgContLang;
$text = preg_replace_callback(
self::CHAR_REFS_REGEX,
[ self::class, 'decodeCharReferencesCallback' ],
);
if ( $count ) {
- return $wgContLang->normalize( $text );
+ return MediaWikiServices::getInstance()->getContentLanguage()->normalize( $text );
} else {
return $text;
}