From ca94db0347655057c19b75be8d1c401068a200c7 Mon Sep 17 00:00:00 2001 From: Slava Shishkin Date: Thu, 31 Jul 2025 20:51:35 +0300 Subject: [PATCH] Bug 40569: Escape quotation marks in series fields in XSLT search links (Elasticsearch) 1. Choose Elasticsearch like Search engine: cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SearchEngine 2. Create or edit a bibliographic record (beter more then one) 3. In field 490$a or 830$a, enter a series name with quotes, e.g. Test "Series" 4. Save the record 5. On the detail page, click the Series link (generated from the XSLT view)Series: Test "Series" 6. The search fails or returns an error due to malformed query 7. Apply the patch 8. Reload the bibliographic detail page 9. Click the Series link again 10. The search should return matching records --- .../prog/en/xslt/MARC21slimUtils.xsl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index b30efc0e069..4cfd050fd63 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -413,7 +413,10 @@ Series: - ?q=se,phr:"" + ?q=se,phr: + + + @@ -438,7 +441,10 @@ - ?q=se,phr:"" + ?q=se,phr: + + + @@ -538,7 +544,10 @@ - ?q=se,phr:"" + ?q=se,phr: + + + -- 2.50.1