https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43665 --- Comment #1 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- Created attachment 206954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206954&action=edit Bug 43665: Pass the values in a single hash, expose them as data-* attributes on a hidden element (where the "html" filter is correct, the browser decodes entities) and read them with dataset in the script. This also replaces 19 repeated "if (code.value == 'x')" blocks. Test plan: 1. In a MARC21 bibliographic framework, link 773$t to the plugin marc21_linking_section.pl. 2. Create a bibliographic record (the host record) with: 100 $a Doe, John 245 $a Tom & Jerry : "the best" episodes </script> 250 $a 2nd ed. "revised & corrected" 260 $a London : $b Smith's Books & Co, $c 2020 3. Create a second record (the analytical record) and open the plugin from 773$t. 4. Search "Jerry" and click "Choose" on the host record. 5. Without the patch: 773$t, $b, $d and $k show literal & " and ' instead of & " and '. With the patch: the values are shown exactly as in the host record and the popup closes normally, even with </script> in the title. 6. Create a record with 245 ind1=1 ind2=4 and 245 $a The Beatles & co. : "greatest" hits Repeat steps 3 and 4 with the search "Beatles". 773$t must be: Beatles & co. : "greatest" hits 7. Sign off. Sponsored-by: BibLibre -- You are receiving this mail because: You are watching all bug changes.