Bug 27912

Summary: Quotes break guarantor search
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: critical    
Priority: P1 - high CC: fridolin.somers, gmcharlt, jonathan.druart, joonas.kylmala, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26865
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Christopher Brannon 2021-03-09 21:49:09 UTC
If a patron has quotes in the borrowernotes field, you will not be able to search for them with the guarantor search.  The search just keeps searching and never ends.

If there are going to be characters that break functions, there should be some validation in place to prevent these characters from being saved.  Otherwise, we need to make it so the characters don't break the function.
Comment 2 Fridolin Somers 2021-12-18 08:36:04 UTC
I reproduce.

Ajax call returns a JSON with an HTML href containing a JSON HTML-encoded.
  value=\"[% To.json(data) | html %]\"

This double-quotes generates :
  \&quot;test\&quot;

Maybe as a quick fix remove borrowernotes from those Ajax tables.
Comment 3 Katrin Fischer 2021-12-18 21:39:54 UTC
I feel like we have fixed this in other places and just removing borrowernotes will leave us with the same issue in other input fields like firstname that we cannot remove.

This one might give a clue:
Bug 22715 - Searching for patrons with "" in the circulation note hangs patron search

And then there is also:
Bug 26865 - Double quotes in patron's data breaks patron searches (no patch yet)
Comment 4 Jonathan Druart 2022-02-09 09:41:00 UTC
Will be fixed by bug 30055.

*** This bug has been marked as a duplicate of bug 30055 ***