From 9a52d97360c1e97c875b93260ab19526770275f8 Mon Sep 17 00:00:00 2001 From: Victor Grousset/tuxayo Date: Sat, 8 May 2021 23:30:14 +0200 Subject: [PATCH] Bug 27942: [<=20.05] Add escape_str() in staff-global.js It was added in bug 27930 which in not in <= 20.05 Signed-off-by: Andrew Fuerste-Henry --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 2397d4ad14..29249bf003 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -16,6 +16,10 @@ function formatstr(str, col) { }); } +function escape_str(s){ + return s != null ? s.escapeHtml() : ""; +} + var HtmlCharsToEscape = { '&': '&', '<': '<', -- 2.39.5