To test: - Add a new record from default framework in cataloguing - Enter something containing an & in the middle (Stuff & stuff) in 245$a 100$a - Click on Z39.50/SRU search - Verify the fields author and title are prefilled, but information is cut off at the & See also bug 11446 in this context.
If you really want to turn one bug into having to file dozens more, make your first step be "create a new MARC framework with the description Ants & Bees and the code A&B." Once you get past the inability to import an exported framework into it, and just click MARC structure and get the offer to copy in from default so you can use it to catalog, I'd expect there will be a lot more bustage (besides what I noticed fixing this, that when you find a record via Z39.50 and try to load it, it will come back into the nonexistent framework "A").
Created attachment 103892 [details] [review] Bug 25308: Escape querystring for Z39.50 popup from cataloging Test plan: 1. For bonus fun, Administration -> MARC Frameworks -> New framework, with the code A&B and description Ants & Bees 2. In the A&B Actions menu, choose MARC structure since Import won't work 3. Accept the offer to copy in structure from default 4. Cataloging -> New record -> Ants & Bees 5. Type This & That in the 245$a (and for extra credit, in 020$a, and create an author authority with an & in it so you can put it in the 100/110) 6. Click Z39.50/SRU search, make sure everything you typed is prefilled including the parts after & 7. Search for anything that will retrieve a record (the ISBN This & That probably won't), choose Import 8. Check that the record came back, and verify in the Settings menu that it's still in the Ants & Bees framework.
Hi Phil, in order to get the fixes in fast, it's good to split things into smaller bugs. This way your other patch can go in, while we work on the next ones. I think there is some expectation that people don't pick special chars for codes (like framework codes), but of course descriptions and data should work. It's still good to fix such things, but I think the risk for catalog data is higher. Thx for the patch!
Created attachment 104240 [details] [review] Bug 25308: Escape querystring for Z39.50 popup from cataloging Test plan: 1. For bonus fun, Administration -> MARC Frameworks -> New framework, with the code A&B and description Ants & Bees 2. In the A&B Actions menu, choose MARC structure since Import won't work 3. Accept the offer to copy in structure from default 4. Cataloging -> New record -> Ants & Bees 5. Type This & That in the 245$a (and for extra credit, in 020$a, and create an author authority with an & in it so you can put it in the 100/110) 6. Click Z39.50/SRU search, make sure everything you typed is prefilled including the parts after & 7. Search for anything that will retrieve a record (the ISBN This & That probably won't), choose Import 8. Check that the record came back, and verify in the Settings menu that it's still in the Ants & Bees framework. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This works as described, there is an edge case for the frameworks, but I feel if at all, we should deal with them separately. People should really not use special chars in framework codes. Test: - Select the framework with A&B from the Z39.50 pull down for import - Search for any record and import it - Verify you end up on an empty page, instead of the filled framework.
Created attachment 104925 [details] [review] Bug 25308: Escape querystring for Z39.50 popup from cataloging Test plan: 1. For bonus fun, Administration -> MARC Frameworks -> New framework, with the code A&B and description Ants & Bees 2. In the A&B Actions menu, choose MARC structure since Import won't work 3. Accept the offer to copy in structure from default 4. Cataloging -> New record -> Ants & Bees 5. Type This & That in the 245$a (and for extra credit, in 020$a, and create an author authority with an & in it so you can put it in the 100/110) 6. Click Z39.50/SRU search, make sure everything you typed is prefilled including the parts after & 7. Search for anything that will retrieve a record (the ISBN This & That probably won't), choose Import 8. Check that the record came back, and verify in the Settings menu that it's still in the Ants & Bees framework. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
We could indeed find some more bugs in this area. Just looking at e.g. git grep Z3950Terms.
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11