)
);
+ $experimentalStructuredChangeFilters =
+ $this->getConfig()->get( 'StructuredChangeFiltersEnableExperimentalViews' );
+
$out->addJsConfigVars( 'wgStructuredChangeFilters', $jsData['groups'] );
$out->addJsConfigVars(
'wgStructuredChangeFiltersEnableSaving',
);
$out->addJsConfigVars(
'wgStructuredChangeFiltersEnableExperimentalViews',
- $this->getConfig()->get( 'StructuredChangeFiltersEnableExperimentalViews' )
+ $experimentalStructuredChangeFilters
);
$out->addJsConfigVars(
'wgStructuredChangeFiltersEnableLiveUpdate',
$this->getConfig()->get( 'StructuredChangeFiltersEnableLiveUpdate' )
);
- $out->addJsConfigVars(
- 'wgRCFiltersChangeTags',
- $this->buildChangeTagList()
- );
+ if ( $experimentalStructuredChangeFilters ) {
+ $out->addJsConfigVars(
+ 'wgRCFiltersChangeTags',
+ $this->buildChangeTagList()
+ );
+ }
}
}
* @return Array Tag data
*/
protected function buildChangeTagList() {
- function stripAllHtml( $input ) {
- return trim( html_entity_decode( strip_tags( $input ) ) );
- }
-
$explicitlyDefinedTags = array_fill_keys( ChangeTags::listExplicitlyDefinedTags(), 0 );
$softwareActivatedTags = array_fill_keys( ChangeTags::listSoftwareActivatedTags(), 0 );
$tagStats = ChangeTags::tagUsageStatistics();
$result[] = [
'name' => $tagName,
- 'label' => stripAllHtml( ChangeTags::tagDescription( $tagName, $this->getContext() ) ),
- 'description' => $desc ? stripAllHtml( $desc->parse() ) : '',
+ 'label' => Sanitizer::stripAllTags(
+ ChangeTags::tagDescription( $tagName, $this->getContext() )
+ ),
+ 'description' => $desc ? Sanitizer::stripAllTags( $desc->parse() ) : '',
'cssClass' => Sanitizer::escapeClass( 'mw-tag-' . $tagName ),
'hits' => $hits,
];