]> git.koha-community.org Git - koha.git/commit
Bug 20891: Escape html then JSON
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 8 Jun 2018 15:19:41 +0000 (12:19 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Apr 2019 15:19:43 +0000 (16:19 +0100)
commit6bf436065ebf93cbda4e67c05a238b0e63c22d42
tree374d29305b49bbe83ba5b2373697428439375556
parent05ffb6c6af451aa764f0cb4be1d712d7334f1167
Bug 20891: Escape html then JSON

To my understanding we need to escape first html chars then to JSON.

If this patch works we will need to rethink the 'To' TT plugin.
It was originally designed to have several escape methods, but with
these changes it will not make sense to name it 'To' if used only to
escape JSON

IIRC we should keep the 2 different ways to use it:
 * [% To.json( string ) %]
 * [% string | $To %]
otherwise it will be hard to use it when called in argument of
patron-title.inc (`git grep To.json`)

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 bdf0d85c1de9cbb37cc8a40b0b4a2e86633d3aaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Template/Plugin/To.pm
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt