From cdfd60ebeb9ef87992fee4ea11839aaea308f50b Mon Sep 17 00:00:00 2001 From: Varlin Date: Sun, 31 May 2026 21:56:09 +0200 Subject: [PATCH] Fix double-encoded filter name in date range inputs pass the raw (non-encoded) filter name to getDateRangeInput() to avoid double encoding, which breaks URL in case of accents --- includes/Specials/BrowseData/GetApplicableFilters.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Specials/BrowseData/GetApplicableFilters.php b/includes/Specials/BrowseData/GetApplicableFilters.php index 2c8bc10e..9f4ea89a 100644 --- a/includes/Specials/BrowseData/GetApplicableFilters.php +++ b/includes/Specials/BrowseData/GetApplicableFilters.php @@ -455,7 +455,10 @@ private function getUnappliedFilterLine( Filter $f ): string { // For dates additionally add two datepicker inputs (Start/End) to select a custom interval. if ( $f->propertyType() == 'date' && $possibleValues->count() != 0 ) { - $results_line .= '
' . $this->getDateRangeInput( $filter_name, $possibleValues->dateRange() ); + # $filter_name is alread urlencoded, and getDateRangeInput applies a second urlencode() + # so this breaks the URL sent to the browser. Use a raw filter name instead. + $raw_filter_name = str_replace( ' ', '_', $f->name() ); + $results_line .= '
' . $this->getDateRangeInput( $raw_filter_name, $possibleValues->dateRange() ); } $text = $this->getFilterLine( $f->name(), false, $normal_filter, $results_line, $f );