🔀 Merge pull request #1351 from deneor/issue_1343

[FIX] #1343 Search for items with cyrillic titles dosnt work
Fixes ##1343
This commit is contained in:
Alicia Sykes 2023-11-14 20:19:38 +00:00 committed by GitHub
commit 6a39aaac6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ const getDomainFromUrl = (url) => {
*/
const filterHelper = (compareStr, searchStr) => {
if (!compareStr) return false;
const process = (input) => input?.toString().toLowerCase().replace(/[^\w\s]/gi, '');
const process = (input) => input?.toString().toLowerCase().replace(/[^\w\s\p{Alpha}]/giu, '');
return process(searchStr).split(/\s/).every(word => process(compareStr).includes(word));
};