The AJAX DataTable of existing lists is broken because the action buttons are incorrectly rendered. The "| html" filter should be removed from the action_block declarations.
Created attachment 79442 [details] [review] Bug 21418: Incorrectly filtered markup in staff client lists This patch removes the "|html" filter from some variable declarations in the template used to display the list of lists in the staff client. To test you should have at least one list. Apply the patch and go to Lists. In the table of lists, the "Edit" and "Delete" buttons should look correct and work correctly.
Hey Owen I'm pretty sure we need to filter everything or the QA scripts will complain, so we should use raw when we don't want html https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML9:_filter_all_the_variables That way its easy to find unfiltered variables (by mistake) vs ones specifically chosen not to be filtered. If that makes sense?
But isn't it getting filtered later at line 60? [%~ To.json(action_block) | $raw ~%]
If the TT block contains '=' the script/test will not complain, so these changes should be good.
Created attachment 79610 [details] [review] Bug 21418: Incorrectly filtered markup in staff client lists This patch removes the "|html" filter from some variable declarations in the template used to display the list of lists in the staff client. To test you should have at least one list. Apply the patch and go to Lists. In the table of lists, the "Edit" and "Delete" buttons should look correct and work correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 79611 [details] [review] Bug 21418: Html escape the 2 variables We should be on the safe side without this patch because shelfnumber and type comes from the DB and are integer or varchar. It may be better to show good examples to start, and escape everything anyway. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 79612 [details] [review] Bug 21418: Remove shelfoff which is not used No need to add a new line to escape this variable that is never used, better to remove it `git grep shelfoff` will prove that it is not used anywhere else. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 79706 [details] [review] Bug 21418: Html escape the 2 variables We should be on the safe side without this patch because shelfnumber and type comes from the DB and are integer or varchar. It may be better to show good examples to start, and escape everything anyway. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 79707 [details] [review] Bug 21418: Remove shelfoff which is not used No need to add a new line to escape this variable that is never used, better to remove it `git grep shelfoff` will prove that it is not used anywhere else. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 79830 [details] [review] Bug 21418: Incorrectly filtered markup in staff client lists This patch removes the "|html" filter from some variable declarations in the template used to display the list of lists in the staff client. To test you should have at least one list. Apply the patch and go to Lists. In the table of lists, the "Edit" and "Delete" buttons should look correct and work correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 79831 [details] [review] Bug 21418: Html escape the 2 variables We should be on the safe side without this patch because shelfnumber and type comes from the DB and are integer or varchar. It may be better to show good examples to start, and escape everything anyway. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 79832 [details] [review] Bug 21418: Remove shelfoff which is not used No need to add a new line to escape this variable that is never used, better to remove it `git grep shelfoff` will prove that it is not used anywhere else. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Awesome work all! Pushed to master for 18.11
Causing bug not in 18.05.x series.