From 6d17924b9da05dd4f2106a55300ce2f5f4631458 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Thu, 13 Mar 2014 11:58:18 +0100 Subject: [PATCH] [PASSED QA] Bug 9811: Fixing JSON validation error for non-javascript string literal characters Issue: When a patron has backslashes in his circulation notes, the JSON transportation layer cannot send the message because it will fail JSON validation when trying to validate backslashed non-literal characters (\s \d ...). This causes the whole search to fail when even one Borrower has a non-literal backslashed character in his notes. Solution: The Borrowers' circulation notes are filtered through a regexp which doubles all backslashes to prepare them for the JSON validation routine. Result: Backslashes pass through unchanged. Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/members/tables/members_results.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index 1a975b9..5cb8cfd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -24,7 +24,7 @@ "dt_fines": "[% IF data.fines < 0 %][% data.fines |html %] [% ELSIF data.fines > 0 %] [% data.fines |html %] [% ELSE %] [% data.fines |html%] [% END %]", "dt_borrowernotes": - "[% data.borrowernotes |html |html_line_break |collapse %]", + "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", "dt_action": "[% IF data.category_type %]Edit[% ELSE %][% IF data.categorycode %]Edit[% ELSE %]Edit[% END %][% END %]", "borrowernumber": -- 1.8.3.2