From c97452826114c6aa2f0646fd1510f25d91c3c887 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Tue, 18 Sep 2012 15:59:37 +0200 Subject: [PATCH] Bug 8702: System preferences search does not allow accented letters This bug enables accented/diacritic system preference text to be matched when searching for sysprefs. Signed-off-by: wajasu Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack Signed-off-by: Jared Camins-Esakov --- admin/preferences.pl | 5 ++++- .../intranet-tmpl/prog/en/includes/prefs-admin-search.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index 0dcec19fe6..118fc93a2a 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -297,7 +297,10 @@ my @TABS; if ( $op eq 'search' ) { my $searchfield = $input->param( 'searchfield' ); - $searchfield =~ s/[^a-zA-Z0-9_ -]//g; + $searchfield =~ s/\p{IsC}//g; + $searchfield =~ s/\s+/ /; + $searchfield =~ s/^\s+//; + $searchfield =~ s/\s+$//; $template->param( searchfield => $searchfield ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc index 3fb81e8bc3..722a12a61b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc @@ -5,7 +5,7 @@
- +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 7fd77bed14..b98d324ed2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -42,7 +42,7 @@ [% END %] [% IF ( search_not_found ) %]
- No system preferences matched your search for [% searchfield %]. You can try a different search or return to where you were before. + No system preferences matched your search for [% searchfield |html %]. You can try a different search or return to where you were before.
[% END %] [% FOREACH TAB IN TABS %] -- 2.39.5