[Bug 14044] New: Backslashes ( and possibly other characters ) break patron search
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Bug ID: 14044 Summary: Backslashes ( and possibly other characters ) break patron search Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If a patron has a backslash character ( \ ) in a field displayed in the patron search, and that patron is part of a set of search results, those search results will never display. Instead, it will just sit at the "Processing..." message forever. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 38340 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38340&action=edit Bug 14044 - Backslashes ( and possibly other characters ) break patron search If a patron has a backslash character ( \ ) in a field displayed in the patron search, and that patron is part of a set of search results, those search results will never display. Instead, it will just sit at the "Processing..." message forever. Test Plan: 1) Edit a patron, add a backslash to the address for the patron 2) Do a patron search where this patron would be one of many results 3) Note the results never display 4) Apply this patch 5) Repeat step 2 6) Note the results now display -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38340|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38343 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38343&action=edit Bug 14044 - Backslashes ( and possibly other characters ) break patron search If a patron has a backslash character ( \ ) in a field displayed in the patron search, and that patron is part of a set of search results, those search results will never display. Instead, it will just sit at the "Processing..." message forever. Test Plan: 1) Edit a patron, add a backslash to the address for the patron 2) Do a patron search where this patron would be one of many results 3) Note the results never display 4) Apply this patch 5) Repeat step 2 6) Note the results now display Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- The bad news is that the issue is certainly also present on members/tables/guarantor_search.tt patroncards/tables/members_results.tt, serials/tables/members_results.tt and common/patron_search.tt But some of the patron information is not displayed on them. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- With the patch applied, there are "" appearing in the result table, even for empty fields. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38343|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38542 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38542&action=edit Bug 14044: Escape json strings for patron searches In a couple of patron searches, the address is displayed. If the address contain invalid json characters, DataTables won't manage to parse the results and display them. This patch makes the templates more readable by creating a BLOCK instead of a long line and escape the invalid json characters calling the TT plugin (To.json). Test plan: Edit a patron and add something like: patron <address> \123 ☎ ⚑ in the address field. Search for this patron using the main patron search (members/member.pl) and the guarantor search. Confirm that a result with this patron is correctly displayed. Regression test: Since Koha::Template::Plugin::To::json is modified, confirm that the add users to basket search (on acqui/basket.pl?basketno=X click on the "Add user" button) still works as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |cbrannon@cdalibrary.org --- Comment #6 from Christopher Brannon <cbrannon@cdalibrary.org> --- Works in circulation.pl. Problem still exists in member.pl and guarantor_search.pl. Don't know about other areas. Christopher -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Christopher Brannon from comment #6)
Works in circulation.pl. Problem still exists in member.pl and guarantor_search.pl. Don't know about other areas.
Christopher
Hi Christopher, What does not work? I have tried again it seems to work. Note that this patch does not modify the circulation.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Jonathan Druart from comment #7)
Hi Christopher, What does not work? I have tried again it seems to work. Note that this patch does not modify the circulation.pl
Turns out the patch is not applying. Please take a look at the patch when you can. Christopher -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38542|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38641 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38641&action=edit Bug 14044: Escape json strings for patron searches In a couple of patron searches, the address is displayed. If the address contain invalid json characters, DataTables won't manage to parse the results and display them. This patch makes the templates more readable by creating a BLOCK instead of a long line and escape the invalid json characters calling the TT plugin (To.json). Test plan: Edit a patron and add something like: patron <address> \123 ☎ ⚑ in the address field. Search for this patron using the main patron search (members/member.pl) and the guarantor search. Confirm that a result with this patron is correctly displayed. Regression test: Since Koha::Template::Plugin::To::json is modified, confirm that the add users to basket search (on acqui/basket.pl?basketno=X click on the "Add user" button) still works as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #10 from Christopher Brannon <cbrannon@cdalibrary.org> --- Created attachment 38671 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38671&action=edit [SIGNED OFF]Bug 14044: Escape json strings for patron searches In a couple of patron searches, the address is displayed. If the address contain invalid json characters, DataTables won't manage to parse the results and display them. This patch makes the templates more readable by creating a BLOCK instead of a long line and escape the invalid json characters calling the TT plugin (To.json). Test plan: Edit a patron and add something like: patron <address> \123 ☎ ⚑ in the address field. Search for this patron using the main patron search (members/member.pl) and the guarantor search. Confirm that a result with this patron is correctly displayed. Regression test: Since Koha::Template::Plugin::To::json is modified, confirm that the add users to basket search (on acqui/basket.pl?basketno=X click on the "Add user" button) still works as expected. Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38641|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #11 from Christopher Brannon <cbrannon@cdalibrary.org> --- Did the sign off, but had to figure out how to work around issues the special characters in your test plan created. FYI. Otherwise, looks good. Works great. Christopher -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, I found another something - try adding a " to the address data - it will display as " on the patron result list. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38718 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38718&action=edit Bug 14044: Don't escape html characters -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #12)
Sorry, I found another something - try adding a " to the address data - it will display as " on the patron result list.
Yes, either we escape html characters or not :) It seems that there are not in other places, but in this case if a <td> or <tr> is found, it will make the table explodes. But... who does put these tags or quote in an address field? :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It literally showed up as " in the result list - but retesting it now it is ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38671|0 |1 is obsolete| | Attachment #38718|0 |1 is obsolete| | --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38790 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38790&action=edit [PASSED QA] Bug 14044: Escape json strings for patron searches In a couple of patron searches, the address is displayed. If the address contain invalid json characters, DataTables won't manage to parse the results and display them. This patch makes the templates more readable by creating a BLOCK instead of a long line and escape the invalid json characters calling the TT plugin (To.json). Test plan: Edit a patron and add something like: patron <address> \123 ☎ ⚑ in the address field. Search for this patron using the main patron search (members/member.pl) and the guarantor search. Confirm that a result with this patron is correctly displayed. Regression test: Since Koha::Template::Plugin::To::json is modified, confirm that the add users to basket search (on acqui/basket.pl?basketno=X click on the "Add user" button) still works as expected. Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38791 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38791&action=edit [PASSED QA] Bug 14044: Don't escape html characters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #19 from Liz Rea <liz@catalyst.net.nz> --- Feeling like this might be a candidate for 3.18, so making note to myself to check it. -Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #20 from Liz Rea <liz@catalyst.net.nz> --- This is a problem all the way back into 3.18, and the patches won't come over cleanly. Might we have a 3.18 version of this? Cheers, Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #21 from Liz Rea <liz@catalyst.net.nz> --- Actually I was wrong, it wasn't the slash, it was \r\n in the address fields that are doing it - so yeah, backslashes explode this in 3.18. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #22 from Liz Rea <liz@catalyst.net.nz> --- Mason did you mean to change the status on this bug? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #23 from Mason James <mtj@kohaaloha.com> --- (In reply to Liz Rea from comment #22)
Mason did you mean to change the status on this bug?
hi, yes... is the new status not correct? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #24 from Liz Rea <liz@catalyst.net.nz> --- :) nope, it needs a patch for 3.18, but there isn't one yet. :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Mason James from comment #23)
(In reply to Liz Rea from comment #22)
Mason did you mean to change the status on this bug?
hi, yes... is the new status not correct?
Chris didn't pick it for 3.20 yet. So it should remain 'Pushed to master' so he notices it. Well, or Liz could just tell him :-D -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #26 from Liz Rea <liz@catalyst.net.nz> --- Hehe I don't tell Chris what to do. ^.^ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #27 from Mason James <mtj@kohaaloha.com> --- (In reply to Tomás Cohen Arazi from comment #25)
(In reply to Mason James from comment #23)
(In reply to Liz Rea from comment #22)
Mason did you mean to change the status on this bug?
hi, yes... is the new status not correct?
Chris didn't pick it for 3.20 yet.
both patches for this bug seem to be in the stable branch? http://git.koha-community.org/gitweb/?p=koha.git;a=shortlog;h=refs/heads/3.2... 2015-05-06 Jonathan Druart Bug 14044: Don't escape html characters 2015-05-06 Jonathan Druart Bug 14044: Escape json strings for patron searches -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #28 from Liz Rea <liz@catalyst.net.nz> --- This is in 3.20.1, looks like it was missed for a bug update though. Sorry Mason. :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |13021 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13021 [Bug 13021] DataTables server-side processing - guarantor search -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14044 --- Comment #29 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on 13021 for TT plugin To -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org