Bug 20891: Escape list's names in JSON
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Jun 2018 15:17:26 +0000 (12:17 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 23 May 2019 21:26:44 +0000 (21:26 +0000)
commita53d1a733cad6595e142498fef9132f0d2715144
treef5a7282c4e50ccb46c3c5d43f2b7d3b7e22dc13e
parentd39787147ca98bf2b2b982d60dbbc22e21c0a676
Bug 20891: Escape list's names in JSON

When someone uses \ in the description of a list, the datatable in staff
won't load and keeps processing.

Test plan:
- Create a list named "<script>alert('hola');</script>"
- Create another list named "k\o\h\a"
- Hit /cgi-bin/koha/virtualshelves/shelves.pl

=> Without this patch the lists will not be displayed, JSON is
malformated
=> With this patch everything is ok

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2be0195895628ec491ee1f25368e60181c4f1eb2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 05ffb6c6af451aa764f0cb4be1d712d7334f1167)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt