Bug 35772 - Double escaping of patron fields in bookings modal
Summary: Double escaping of patron fields in bookings modal
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 29002
Blocks:
  Show dependency treegraph
 
Reported: 2024-01-11 11:18 UTC by Martin Renvoize
Modified: 2024-02-02 17:50 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02


Attachments
Bug 35772: Remove double escaping (1.03 KB, patch)
2024-01-11 11:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35772: Remove double escaping (1.08 KB, patch)
2024-01-12 07:08 UTC, David Nind
Details | Diff | Splinter Review
Bug 35772: Remove double escaping (1.13 KB, patch)
2024-01-12 13:54 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2024-01-11 11:18:40 UTC
Jonathan reported:

If a patron has HTML character in surname or firstname, Select2 will escapeHtml twice.
To recreate edit a patron, set firstname: <span>test</span>
Place booking, search for test
It shows correctly in the result, but when you select it you will see "&lt;", etc.
Comment 1 Martin Renvoize 2024-01-11 11:21:54 UTC
Created attachment 160832 [details] [review]
Bug 35772: Remove double escaping

Patch as proposed by Jonathan in a comment on bug 29002
Comment 2 David Nind 2024-01-12 07:08:18 UTC
Created attachment 160895 [details] [review]
Bug 35772: Remove double escaping

Patch as proposed by Jonathan in a comment on bug 29002

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-01-12 07:18:53 UTC
Testing notes (using KTD):

1. Replicated the issue as per comment #1
2. Applied the patch.
3. Repeated step 1.
4. Name now displays (with HTML code shown).

Note: IN KTD I had to set DefaultPatronSearchMethod to 'Contains', otherwise searching for Test didn't return any autocomplete results.
Comment 4 Kyle M Hall 2024-01-12 13:54:53 UTC
Created attachment 160965 [details] [review]
Bug 35772: Remove double escaping

Patch as proposed by Jonathan in a comment on bug 29002

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-01-16 10:11:09 UTC
Please include test plan in commits ;) I added one in RM step.
Comment 6 Katrin Fischer 2024-01-16 11:09:50 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 7 Fridolin Somers 2024-01-17 09:32:00 UTC
Pushed to 23.11.x for 23.11.02