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 <fridolin.somers@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f8c85ab26b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef7362b62b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2024-08-08 17:54:48 +00:00 committed by Fridolin Somers
parent 4179a3fe27
commit f4eadaea1e
1 changed files with 3 additions and 3 deletions

View File

@ -873,12 +873,12 @@ elsif ($phase eq 'Run this report'){
}
my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);
my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&amp;phase=Run%20this%20report&amp;limit=$limit&amp;want_full_chart=$want_full_chart";
my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit&want_full_chart=$want_full_chart";
if (@param_names) {
$url = join('&amp;param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names);
$url = join('&param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names);
}
if (@sql_params) {
$url = join('&amp;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) {