From f8c85ab26bb82dd6a1d4a87d0aae41835c304058 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 8 Aug 2024 17:54:48 +0000 Subject: [PATCH] Bug 37595: Double HTML escaped ampersand in pagination bar This patch removes escaping of ampersands in the part of guided_reports.pl that builds information for the pagination routine. The information is going to be escaped in a later step. To test, apply the patch and go to Reports. - If necessary, create a report which will return more than 20 results. - Run the report. You should see a pagination bar at the top of the table of results. - View the page source and look for the markup for the pagination menu. Searching for 'rel="start"' works well. - Confirm that you see '&' between the link parameters instead of '&', e.g. guided_reports.pl?id=347&op=run&limit=20&want_full_chart=0&page=1 Signed-off-by: Fridolin Somers Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- reports/guided_reports.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index e2dfe41268..236e43c8e5 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -972,12 +972,12 @@ if ($op eq 'run'){ } my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); - my $url = "/cgi-bin/koha/reports/guided_reports.pl?id=$report_id&op=run&limit=$limit&want_full_chart=$want_full_chart"; + my $url = "/cgi-bin/koha/reports/guided_reports.pl?id=$report_id&op=run&limit=$limit&want_full_chart=$want_full_chart"; if (@param_names) { - $url = join('&param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names); + $url = join('¶m_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names); } if (@sql_params) { - $url = join('&sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params); + $url = join('&sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params); } if ($template_id) { -- 2.39.5