https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36047
Julian Maurice <julian.maur...@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maur...@biblibre.com --- Comment #7 from Julian Maurice <julian.maur...@biblibre.com> --- With the patch applied, if the reason selected is one from the SUGGEST authorised value category, and this reason has an apostrophe, on the receive modal the reason is displayed inside a text input, instead of the select. I think it's due to the fact that the selector `option[value="l'apostrophe"]` will not match <option value="l'apostrophe">. A properly escaped selector would be `option[value="l\'apostrophe"]` We should do something like this instead: - if($("#reason option[value='"+row.biblio.suggestions[0].reason+"']").length) { + const options = Array.from(document.querySelectorAll('#reason option')) + if (options.some(option => option.value === row.biblio.suggestions[0].reason)) { No need to escape anything -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/