mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-07 17:05:39 +00:00
handle a specific case with rtl character
This commit is contained in:
@@ -22,6 +22,9 @@ export const BannedWords = {
|
||||
|
||||
find: (val: string) => {
|
||||
InvisibleCharacters.forEach(x => val = val.replaceAll(x, ""));
|
||||
return words.some((x) => val.indexOf(x) != -1);
|
||||
var normal = words.some((x) => val.indexOf(x) != -1);
|
||||
val = val.split("").reverse().join("");
|
||||
var rtlOverride = words.some((x) => val.indexOf(x) != -1);
|
||||
return normal || rtlOverride;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user