1. Create corporate authority record which has double-quotes: eg Fundación "La Caixa" (Madrid, Spain) 2. Edit catalogue record where 710 field under authority control. 3. Click gadget in pipe a and searcg for authority 4. Click Choose 5. Observe the catalogue record 710 field now says Fundación "La Caixa" (Madrid, Spain) The entity codes persist when record is saved and viewed elsewhere in the system.
Temporary fix in /kohaclone/koha-tmpl/intranet-tmpl/prog/en-GB/modules/authorities/blinddetail-biblio-search.tt is to add if(values[i].indexOf('"')) { values[i] = values[i].replace(/\"\;/g, '"'); } after line 99, but only deals with " entity, not others.
I have the exact same issue. Although it seems that the issue affects only the *display* of the value that is under authority control (and not the value itself), I believe that the bug should have a higher priority. If will be intimidating for cataloguers to see """ in authority controlled fields.
Created attachment 95275 [details] [review] Bug 23777: Fix auth finder escaping
I will need to double check this fix, but it seems ok at first glance.
Created attachment 95279 [details] [review] Bug 23777: Fix for the advanced editor
Created attachment 95280 [details] [review] Bug 23777: Use To.json in preferences.tt Test plan: Search for "foo bar" (with double quotes) in the sysprefs
Created attachment 95281 [details] [review] Bug 23777: Use To.json in authorities.tt No fix here. Test plan: Edit GENRE/FORM 040$a With text: Original catalo'"ging age"'ncy Save, you get the alert
Created attachment 95282 [details] [review] Bug 23777: Use To.json in results.tt Test plan: Search for a string with quote and confirm that it is correctly highlighted in the result list.
Created attachment 95283 [details] [review] Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt No idea how to test this but, as other fixes work, this one should, right?
Created attachment 95284 [details] [review] Bug 23777: Use To.json in request.tt Test plan: Use quotes in a library's name, then place an item on hold for a patron that cannot do it. If you are allowed to overwrite this restriction you will get a warning: "This item normally cannot be put on hold except for patrons from BRANCHNAME" The library's name should be correcty displayed
Last 5 patches fix similar issues in other templates.
Thanks for looking at this Jonathan. Using same workflow as in first post (2019-10-08 13:50:25 UTC): patch 95275 causes $9 field to be completed (link) but $a field to remain blank after clicking "choose". The entire field is discarded on "save". Adding patch 95279 - ditto but there is now no $9 field either.
What I see: https://snipboard.io/zuKCU0.jpg Everything looks correct for me, can you provide more details? Are you testing on a sandbox?
I'm on the customer test server where we had the original issue. 18.11.04.
(In reply to Bernard from comment #14) > I'm on the customer test server where we had the original issue. 18.11.04. Tested locally with this version + the patches, all good. Do you see an error in the console?
Nothing in the js console. When you click "choose", the small pop up window appears briefly saying "loading", but then Koha just returns to the main catalogue record window.
Created attachment 97685 [details] [review] Bug 23777: Fix auth finder escaping Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97686 [details] [review] Bug 23777: Fix for the advanced editor Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97687 [details] [review] Bug 23777: Use To.json in preferences.tt Test plan: Search for "foo bar" (with double quotes) in the sysprefs Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97688 [details] [review] Bug 23777: Use To.json in authorities.tt No fix here. Test plan: Edit GENRE/FORM 040$a With text: Original catalo'"ging age"'ncy Save, you get the alert Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97689 [details] [review] Bug 23777: Use To.json in results.tt Test plan: Search for a string with quote and confirm that it is correctly highlighted in the result list. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97690 [details] [review] Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt No idea how to test this but, as other fixes work, this one should, right? Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 97691 [details] [review] Bug 23777: Use To.json in request.tt Test plan: Use quotes in a library's name, then place an item on hold for a patron that cannot do it. If you are allowed to overwrite this restriction you will get a warning: "This item normally cannot be put on hold except for patrons from BRANCHNAME" The library's name should be correcty displayed Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Hi, Thanks to rebase this patch. Bug 23777 - Text converted to html entity codes in cataloguing edit form 97685 - Bug 23777: Fix auth finder escaping 97686 - Bug 23777: Fix for the advanced editor 97687 - Bug 23777: Use To.json in preferences.tt 97688 - Bug 23777: Use To.json in authorities.tt 97689 - Bug 23777: Use To.json in results.tt 97690 - Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt 97691 - Bug 23777: Use To.json in request.tt Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 23777: Fix auth finder escaping Applying: Bug 23777: Fix for the advanced editor Applying: Bug 23777: Use To.json in preferences.tt Applying: Bug 23777: Use To.json in authorities.tt Applying: Bug 23777: Use To.json in results.tt Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 23777: Use To.json in results.tt The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-23777-Use-Tojson-in-resultstt-VwtpJU.patch Thanks. Bouzid.
Created attachment 98698 [details] [review] Bug 23777: Use To.json in results.tt Test plan: Search for a string with quote and confirm that it is correctly highlighted in the result list. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 98699 [details] [review] Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt No idea how to test this but, as other fixes work, this one should, right? Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 98700 [details] [review] Bug 23777: Use To.json in request.tt Test plan: Use quotes in a library's name, then place an item on hold for a patron that cannot do it. If you are allowed to overwrite this restriction you will get a warning: "This item normally cannot be put on hold except for patrons from BRANCHNAME" The library's name should be correcty displayed Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 99341 [details] [review] Bug 23777: Fix auth finder escaping Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99342 [details] [review] Bug 23777: Fix for the advanced editor Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99343 [details] [review] Bug 23777: Use To.json in preferences.tt Test plan: Search for "foo bar" (with double quotes) in the sysprefs Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99344 [details] [review] Bug 23777: Use To.json in authorities.tt No fix here. Test plan: Edit GENRE/FORM 040$a With text: Original catalo'"ging age"'ncy Save, you get the alert Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99345 [details] [review] Bug 23777: Use To.json in results.tt Test plan: Search for a string with quote and confirm that it is correctly highlighted in the result list. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99346 [details] [review] Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt No idea how to test this but, as other fixes work, this one should, right? Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99347 [details] [review] Bug 23777: Use To.json in request.tt Test plan: Use quotes in a library's name, then place an item on hold for a patron that cannot do it. If you are allowed to overwrite this restriction you will get a warning: "This item normally cannot be put on hold except for patrons from BRANCHNAME" The library's name should be correcty displayed Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99348 [details] [review] Bug 23777: (QA follow-up) Fix TT closing braces Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Great to see these moving to more traditional filters/escaping/parsing practices. QA scripts are happy and in testing I found all cases working. Passing QA
Nice work everyone! Pushed to master for 20.05
Created attachment 99570 [details] [review] Bug 23777: (follow-up) Use To.json in results.tt Wrong copy/paste here!
*** Bug 24713 has been marked as a duplicate of this bug. ***
does not apply to 19.11.x branch cleanly. please rebase if needed