From 9ee5c9ec1e7f4d9f85ba720e02b7468ff2b327af 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 --- 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 b1ad005b8b..db91e76e7d 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 ad13bec27d..06b075256e 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 @@ -6,7 +6,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 875b863796..95910038de 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