Bug 33319

Summary: Unprintable characters/whitepace breaks item search
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2023-03-23 10:40:38 UTC
When libraries copy and paste callnumbers and other information into items, sometimes additional characters appearing as whitespace in front or the end of the entry are added. These break the item search and you get stuck with 'loading' forever.

I wonder if there is a way we could strip any whitespace appearing at the front or end of the string automatically to avoid this issue.

At the moment you need to analyze the JSON error and fix all of them manually for the item search to start working again, something that is very laborsome.

It might also be nice to automatically trim in the item form as well, at least as an option.