Bugzilla – Attachment 26261 Details for
Bug 9811
Patrons search improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9811: Fixing JSON validation error for non-javascript string literal characters
Bug-9811-Fixing-JSON-validation-error-for-non-java.patch (text/plain), 2.42 KB, created by
Olli-Antti Kivilahti
on 2014-03-13 11:15:27 UTC
(
hide
)
Description:
Bug 9811: Fixing JSON validation error for non-javascript string literal characters
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-03-13 11:15:27 UTC
Size:
2.42 KB
patch
obsolete
>From d96bbd2a214e73b6c89962a99aa80ee45ccafd01 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Thu, 13 Mar 2014 11:58:18 +0100 >Subject: [PATCH] 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. >--- > .../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 %]<span class='credit'>[% data.fines |html %]</span> [% ELSIF data.fines > 0 %] <span class='debit'><strong>[% data.fines |html %]</strong></span> [% ELSE %] [% data.fines |html%] [% END %]</td>", > "dt_borrowernotes": >- "[% data.borrowernotes |html |html_line_break |collapse %]", >+ "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", > "dt_action": > "[% IF data.category_type %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&category_type=[% data.category_type %]'>Edit</a>[% ELSE %][% IF data.categorycode %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&categorycode=[% data.categorycode %]'>Edit</a>[% ELSE %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&category_type=A'>Edit</a>[% END %][% END %]", > "borrowernumber": >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9811
:
16096
|
16111
|
16112
|
16320
|
16362
|
16403
|
16957
|
19056
|
19057
|
19307
|
19633
|
19642
|
20094
|
20095
|
20096
|
20174
|
20266
|
20290
|
20291
|
21169
|
21170
|
21171
|
21172
|
21173
|
21174
|
21175
|
22265
|
23261
|
24095
|
24111
|
26067
|
26068
|
26261
|
26336
|
26337
|
26342
|
26347
|
27642
|
27643
|
27644
|
27645
|
27646
|
27711
|
28738
|
28739
|
28740
|
28741
|
28742
|
28743
|
28744
|
28745
|
28746
|
28747
|
28781
|
28782
|
29019
|
29020
|
29021
|
29022
|
29023
|
29024
|
29025
|
29026
|
29027
|
29028
|
29029
|
29442