[Bug 8702] New: System preferences search does not allow accented letters
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Priority: P5 - low Change sponsored?: --- Bug ID: 8702 CC: gmcharlt@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: System preferences search does not allow accented letters Severity: normal Classification: Unclassified OS: All Reporter: fridolyn.somers@biblibre.com Hardware: All Status: NEW Version: master Component: System Administration Product: Koha System preferences search is not performed using .pref files which are translatable. But actually, special letters are removed from search therm. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 11879 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11879&action=edit Proposed patch Very small patch. Replaces strong regexp replacement by just string trim. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Hmm this is quite a big change, it now allows you to search on anything, only strip trailing space (and combining multiple whitespace into 1) While I don't think this is a problem we have gone from a whitelist to a blacklist I don't know if there are any characters you could use to make a grep behave badly, but i'd like someone else to tell me I'm being paranoid before I sign off :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 D Ruth Bavousett <ruth@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ruth@bywatersolutions.com --- Comment #3 from D Ruth Bavousett <ruth@bywatersolutions.com> --- It might be better to use this: $searchfield =~ s/\p{IsC}//g; #Toss out control codes, Unicode compliant Fridolyn's patch would toss *some* non-word characters--spaces, tabs, newlines, and formfeeds--when they appear at the ends of the string, but would not deal with escape characters or other undesirable inputs. Using this statement would express the original intent in a fully-Unicode-compliant way. Suggest changing the patch to the example above. It will pass letters, marks, numbers, punctuation, symbols, and separators. Chris, your paranoia is a good thing! Any of the other classes of character probably are okay--although most won't match anything--but the control codes are probably a good thing to toss out. (Note: I haven't tried this myself in the Koha context; I've used it elsewhere. Definitely, someone wants to TEST THIS. It's pretty arcane.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11879|0 |1 is obsolete| | --- Comment #4 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 11923 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11923&action=edit Proposed patch (revised) New patch with previous comment proposition. This patch : - removes tailing and leading spaces in search term. - replaces several spaces by one. - removes Unicode control characters. - adds some missing HTML filters for search term in TT. You can check with %9F in URL. See http://www.regular-expressions.info/unicode.html -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |matted-34813@mypacks.net --- Comment #5 from wajasu <matted-34813@mypacks.net> --- I tried to apply the patch. I got: Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/stopwords-admin-search.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/stopwords-admin-search.inc I don't even see stopwords-admin-search.inc mentioned in your patch. So I am too confused to make any assumptions. See: http://paste.koha-community.org/173 Can you rebase and resubmit? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11923|0 |1 is obsolete| | --- Comment #6 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 12311 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12311&action=edit Proposed patch (rebased master) Rebased patch. Previous patch applying failed because one of the files it modified is deleted now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12311|0 |1 is obsolete| | --- Comment #7 from wajasu <matted-34813@mypacks.net> --- Created attachment 12324 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12324&action=edit SIGNED-OFF-Bug-8702-System-preferences-search-accented-sysprefs So i wouldn't need to switch to another language, I tested this way: 1) In my kohadev environment I changed: ./koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref to have Jürgen at the end of displayed text for the ExportWithCsvProfile syspref. Tools: - - pref: ExportWithCsvProfile - CSV profile for export Jürgen 2) I used the admin syspref search, specifying "Jürgen" Result: not found. Plus I got an info message saying not found with "Jrgen" 3) applied patch 4) did the same search, and now I found the syspref with Jürgen. 5) I also searched for something I should not find üxxx and I got an info message which showed the ü Great work! wajasu Note: I took a stray "2" typo out of the original patch. Now folks with accents/diacritics in syspref text will match. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 wajasu <matted-34813@mypacks.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com QA Contact| |mtj@kohaaloha.com --- Comment #8 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #7)
Created attachment 12324 [details] SIGNED-OFF-Bug-8702-System-preferences-search-accented-sysprefs
patch looks good, passing QA… $ koha-qa.pl -c 1 testing 1 commit(s) (applied to commit bd1f621) * 30c1031 Bug 8702: System preferences search does not allow accented letters admin/preferences.pl koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt * admin/preferences.pl OK * koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc OK * koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x, will be in 3.8.6 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8702 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaye@biblibre.co | |m --- Comment #11 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- *** Bug 8416 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org