Fix for Search for items with cyrillic titles dosnt work

This commit is contained in:
Denis Savosin 2023-10-18 11:55:38 +03:00
parent 8a821c2a31
commit 84454b0502
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));
};