]> git.koha-community.org Git - koha.git/commit
Bug 29853: Add HTML filter before KohaSpan filter
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 12 Jan 2022 05:40:35 +0000 (19:40 -1000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 25 Feb 2022 13:19:59 +0000 (08:19 -0500)
commitf80d9d6d78daaaa3523c962184c1314ca5613796
treed3248f7b8c868680237a3e8af11fdf56caf6a2b9
parent4760f6e5dea22d577fc6982aa3e819dea8e04823
Bug 29853: Add HTML filter before KohaSpan filter

Usage of Template Toolkit plugin KohaSpan as filter is actually :
  Group [% added.title | $KohaSpan class = 'name' | $raw %] created.

But KohaSpan filter does not escape HTML characters.
Whe should filter HTML then KohaSpan.

This patch adds TT html filter before KohaSpan.
Also replaces in Javascript html() with text()
to ensure special caracters are still encoded.
See https://api.jquery.com/text/

Test plan :
1) Create a library with name Libra&apos;rie
2) Create a library group with name Grou&apos;pe
3) Play with this group
4) Add library
5) Remove library
6) Edit group
7) Delete group
8) Each time check that &apos, is not interpreted as single quote

Signed-off-by: Solène Desvaux <solene.desvaux@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt