mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-24 09:59:24 -04:00
Full case/diacritics insensitivity in catalog filtering
Catalog filtering should now be case/diacritics insensitive for all fields. However it is not validated for language, name and category fields, and is validated for tags, creator & publisher only for text supplied in the filter (but not for values read from the book).
This commit is contained in:
1 parent
87dc9d2723
commit
f751aff2fb
2 files changed
+13
-11
No files matched your search
+5
-3
@@ -376,9 +376,11 @@ TEST_F(LibraryTest, filterByTags)
|
||||
"Mythology & Folklore Stack Exchange"
|
||||
);
|
||||
|
||||
// filtering by tags is case sensitive
|
||||
EXPECT_FILTER_RESULTS(kiwix::Filter().acceptTags({"stackEXChange"}),
|
||||
/* no results */
|
||||
// filtering by tags is case and diacritics insensitive
|
||||
EXPECT_FILTER_RESULTS(kiwix::Filter().acceptTags({"ståckEXÇhange"}),
|
||||
"Islam Stack Exchange",
|
||||
"Movies & TV Stack Exchange",
|
||||
"Mythology & Folklore Stack Exchange"
|
||||
);
|
||||
|
||||
// filtering by tags requires full match of the search term
|
||||
|
||||
Reference in new issue
Block a user