Bugzilla – Attachment 49517 Details for
Bug 15722
Patron search cannot deal with hidden characters ( tabs ) in fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
k
PASSED-QA-PASSED-QA-Bug-15722-Escape-patron-infos-.patch (text/plain), 6.70 KB, created by
Katrin Fischer
on 2016-03-24 06:54:51 UTC
(
hide
)
Description:
k
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-24 06:54:51 UTC
Size:
6.70 KB
patch
obsolete
>From 6afcf669fe67720c99fb2c02932889b544872d3a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 8 Mar 2016 14:09:09 +0000 >Subject: [PATCH] [PASSED QA] [PASSED QA] Bug 15722: Escape patron infos for > JSON in patron searches > >If patron infos contain invalid JSON chars (\t for instance), the >results won't appear. >The solution is to escape these info. > >Test plan: >Edit patron infos in DB (update borrowers set surname="foobar\t" where >borrowernumber=42) >Search for foobar (you should have more than 1 result) >Without this patch, DT retrieves a bad formatted JSON and the results >won't appear. >With this patch, the table result appears > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt | 2 +- > .../intranet-tmpl/prog/en/modules/members/tables/members_results.tt | 2 +- > .../intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt | 2 +- > .../intranet-tmpl/prog/en/modules/serials/tables/members_results.tt | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt >index 681f1cd..ef325f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt >@@ -9,7 +9,7 @@ > "dt_cardnumber": > "[% data.cardnumber %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]</a></span>", >+ "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]</a></span>", > "dt_branch": > "[% data.branchname |html %]", > "dt_category": >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 930fdc7..fc5530a 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 >@@ -15,7 +15,7 @@ > "dt_cardnumber": > "[% data.cardnumber | html %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %]</span>", >+ "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %]</span>", > "dt_dateofbirth": > "[% data.dateofbirth | $KohaDates %]", > "dt_category": >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt >index cbe741b..087aa8c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt >@@ -9,7 +9,7 @@ > "dt_cardnumber": > "[% data.cardnumber %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]</a></span>", >+ "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]</a></span>", > "dt_category": > "[% data.category_description |html %] ([% data.category_type |html %])", > "dt_branch": >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >index 840b391..b5096c6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >@@ -9,7 +9,7 @@ > "dt_cardnumber": > "[% data.cardnumber %]", > "dt_name": >- "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames cardnumber = data.cardnumber invert_name = 1%]</a></span>", >+ "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.jon(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]</a></span>", > "dt_branch": > "[% data.branchname |html %]", > "dt_action": >-- >1.9.1
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 15722
:
48786
|
48789
|
49517
|
49518