Bugzilla – Attachment 155690 Details for
Bug 33734
Using custom search filters breaks diacritics characters in search term
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33734: Remove incorrect URL escaping on search filters
Bug-33734-Remove-incorrect-URL-escaping-on-search-.patch (text/plain), 3.77 KB, created by
Katrin Fischer
on 2023-09-15 14:48:59 UTC
(
hide
)
Description:
Bug 33734: Remove incorrect URL escaping on search filters
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-15 14:48:59 UTC
Size:
3.77 KB
patch
obsolete
>From 9e60f657aa7d2ba48f67bad7036a4b81d62fbf60 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 13 Sep 2023 02:25:13 +0000 >Subject: [PATCH] Bug 33734: Remove incorrect URL escaping on search filters >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch removes an incorrect URL escaping on search filter >facet URLs. > >Without this patch, search filters using non-ASCII characters won't >return results. > >To test: >0. Apply patch >1. Enable SavedSearchFilters syspref >2. Search for "the" >3. Save as search filter (to show on both OPAC and staff interface) >4. Search for "ü" in staff interface >5. Apply the "the" filter >6. Note that search results appear >7. Search for "ü" in OPAC >8. Apply the "the" filter >9. Note that search results appear > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 5 +++-- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >index 3e708036f6..0dc74bbe9f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc >@@ -13,11 +13,12 @@ > <ul> > [% SET base_url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] > [% FOREACH search_filter IN search_filters %] >+ [% SET search_filter_id = search_filter.id | uri %] > <li> > [% IF active_filters.${search_filter.id} %] >- <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter.id | url %]">[x]</a></span> >+ <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter_id | $raw %]">[x]</a></span> > [% ELSE %] >- <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter.id | url %]">[% search_filter.name | html %]</a></span> >+ <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter_id | $raw %]">[% search_filter.name | html %]</a></span> > [% END %] > </li> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >index 94f9195246..736b2ef24c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc >@@ -11,11 +11,12 @@ > <ul> > [% SET base_url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %] > [% FOREACH search_filter IN search_filters %] >+ [% SET search_filter_id = search_filter.id | uri %] > <li> > [% IF active_filters.${search_filter.id} %] >- <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter.id | url %]">[x]</a></span> >+ <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter_id | $raw %]">[x]</a></span> > [% ELSE %] >- <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter.id | url %]">[% search_filter.name | html %]</a></span> >+ <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter_id | $raw %]">[% search_filter.name | html %]</a></span> > [% END %] > </li> > [% END %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33734
:
151551
|
151653
|
155582
|
155583
|
155584
|
155585
| 155690