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)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 25 Apr 2019 10:27:27 +0000 (10:27 +0000)
commit2be0195895628ec491ee1f25368e60181c4f1eb2
tree421fe38d04596e5d239bc9048dd72e20bc10d5e2
parentab2e7730387156841adc18b1659241f427bde7ef
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>
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt