From 7145b62773eaa213c75dc2f8597b19c6a54a6749 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 --- 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 4a63f20bab..487388360d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -15,6 +15,10 @@ function formatstr(str, col) { }); } +function escape_str(s){ + return s != null ? s.escapeHtml() : ""; +} + var HtmlCharsToEscape = { '&': '&', '<': '<', -- 2.31.1