From 95ed5002721db9bc957116149a6bc8454b06a7c4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 11 Jan 2024 11:20:55 +0000 Subject: [PATCH] Bug 35772: Remove double escaping Patch as proposed by Jonathan in a comment on bug 29002 If a patron has HTML character in surname or firstname, Select2 will escapeHtml twice. To test: * Edit a patron, set firstname: test * Place booking, search for test * It shows correctly in the result, but when you select it you will see "<", etc. * Apply patch * Verify the display is now corrected. Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer (cherry picked from commit 96681cfa07de61ca28b9e0f1d572e1ee03f5a655) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js index 9f35cd3a64..b4f13bf2d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js +++ b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js @@ -100,7 +100,7 @@ $('#placeBookingModal').on('show.bs.modal', function(e) { return patron.text; } return ( - escape_str(patron.surname) + ", " + escape_str(patron.firstname) + patron.surname + ", " + patron.firstname ); }, placeholder: __("Search for a patron") -- 2.39.5