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: <span>test</span>
* Place booking, search for test
* It shows correctly in the result, but when you select it you will see "&lt;", etc.
* Apply patch
* Verify the display is now corrected.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-01-11 11:20:55 +00:00 committed by Katrin Fischer
parent 328c5dcdfa
commit 96681cfa07
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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")