From b6d8bc82ac3756899252c1dde2035833ed1ce862 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Thu, 31 Jan 2019 09:40:08 +0000 Subject: [PATCH] Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load --- koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 5bf7472f79..37c437f71f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -40,8 +40,10 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr checked: false, }, [%- FOREACH server = z3950_servers -%] + [% s_name = server.servername %] + [% s_name.replace('\'', ''') %] [% server.id | html %]: { - name: '[% server.servername | html %]', + name: '[% s_name | html %]', recordtype: '[% server.recordtype | html %]', checked: [% server.checked ? 'true' : 'false' | html %], }, -- 2.11.0