https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37573 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170094|0 |1 is obsolete| | --- Comment #9 from Magnus Enger <magnus@libriotech.no> --- Created attachment 173767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173767&action=edit Bug 37573: Fix bad escaping in OPACSearchForTitleIn that broke JavaScript in <script> tags in it The helper Perl function parametrized_url that converted parameters within {} would actually remove everything between such characters, regardless of whether they were a correct parameter or any arbitrary text. The patch changes it to remove only something that would look like a parameter, so that it won't break other unrelated things, while keeping the original intended behavior. Test plan: 1. Go to settings and in pref OPACSearchForTitleIn enter this: <script> function test() { console.log("test!"); } test(); </script> 2. Go to OPAC and open some biblio record's page. 3. Open dev tools console (Ctrl+Shift+I). Before applying the patch you should see a syntax error, after applying it you should see "test!" logged. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. I added the test plan from Bugzilla to the commit message above. -- You are receiving this mail because: You are watching all bug changes.