Summary: | Double HTML escaped ampersand in pagination bar | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | Pushed to oldoldstable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dcook, lucas, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
|
Circulation function: | |||
Bug Depends on: | 30969 | ||
Bug Blocks: | |||
Attachments: |
Bug 37595: Double HTML escaped ampersand in pagination bar
Bug 37595: Double HTML escaped ampersand in pagination bar Bug 37595: Double HTML escaped ampersand in pagination bar |
Description
Fridolin Somers
2024-08-07 14:59:47 UTC
Looks like Firefox deals with it but still a bug right ? For this particular case it looks like we can convert the '&' to '&' in guided_reports.pl between line 974 and 979. Generally, it looks like we're using '&' in a lot of Perl code where I don't think we need to. For instance at line 345 of basketgroup.pl: print $input->redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' . $booksellerid.'&listclosed=1'); There's no need to encode that &. I'm guessing that in most places we use & it's because obsolete XHTML validator rules required us to. A current validator won't complain about it and I question whether there are places that require it for other reasons. (In reply to Owen Leonard from comment #2) > For this particular case it looks like we can convert the '&' to '&' in > guided_reports.pl between line 974 and 979. > Generally, it looks like we're using '&' in a lot of Perl code where I > don't think we need to. For instance at line 345 of basketgroup.pl: > There's no need to encode that &. I'm guessing that in most places we use > & it's because obsolete XHTML validator rules required us to. A current > validator won't complain about it and I question whether there are places > that require it for other reasons. +1 Created attachment 170162 [details] [review] 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 '&amp;', e.g. guided_reports.pl?id=347&op=run&limit=20&want_full_chart=0&page=1 Created attachment 170170 [details] [review] 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 '&amp;', 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> Created attachment 170432 [details] [review] 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 '&amp;', 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> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 |