X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchanges.php;h=4f2158641855db28dbdfc243a0dd8da0cd5a1ec6;hp=bec87c592a097684816dcd9d3a0bdaaa0bab2cdb;hb=7d623a35bb305b7233a3c2181879fee9ba6c1274;hpb=ebc36b75b87b9752a12c25d41a3619faa7d2715e diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index bec87c592a..4f21586418 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -138,10 +138,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage { * @param string $subpage */ public function execute( $subpage ) { - global $wgStructuredChangeFiltersEnableSaving, - $wgStructuredChangeFiltersEnableExperimentalViews, - $wgStructuredChangeFiltersEnableLiveUpdate; - // Backwards-compatibility: redirect to new feed URLs $feedFormat = $this->getRequest()->getVal( 'feed' ); if ( !$this->including() && $feedFormat ) { @@ -184,15 +180,15 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $out->addJsConfigVars( 'wgStructuredChangeFilters', $jsData['groups'] ); $out->addJsConfigVars( 'wgStructuredChangeFiltersEnableSaving', - $wgStructuredChangeFiltersEnableSaving + $this->getConfig()->get( 'StructuredChangeFiltersEnableSaving' ) ); $out->addJsConfigVars( 'wgStructuredChangeFiltersEnableExperimentalViews', - $wgStructuredChangeFiltersEnableExperimentalViews + $this->getConfig()->get( 'StructuredChangeFiltersEnableExperimentalViews' ) ); $out->addJsConfigVars( 'wgStructuredChangeFiltersEnableLiveUpdate', - $wgStructuredChangeFiltersEnableLiveUpdate + $this->getConfig()->get( 'StructuredChangeFiltersEnableLiveUpdate' ) ); $out->addJsConfigVars( 'wgRCFiltersChangeTags', @@ -207,10 +203,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage { * @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(); @@ -233,8 +225,10 @@ class SpecialRecentChanges extends ChangesListSpecialPage { $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, ];