From 74324c3dc8be16316647c38dfc97445508754c17 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 16 Feb 2024 16:58:41 +0000 Subject: [PATCH] Bug 36047: Workaround the apostrophe This is just a quick hack fix highlighting where the issue lies the real fix should be escape HTML entities coming from biblio.suggestions as this fix may also fail in case the data contains double quotes --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index eb834ea4c21..db3b555257e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -1150,7 +1150,7 @@ } if(row.biblio.suggestions[0].reason) { $("#suggestion_reason").show(); - if($("#reason option[value='"+row.biblio.suggestions[0].reason+"']").length) { + if($("#reason option[value=\""+row.biblio.suggestions[0].reason+"\"]").length) { $("#other_reason a").click(); $("#reason").val(row.biblio.suggestions[0].reason); $("#select-other_reason").val(null); -- 2.30.2