mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 10:22:39 +01:00
handle a specific case with rtl character
This commit is contained in:
parent
aba1d02941
commit
fdbd150ce3
@ -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;
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user