mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
different approach to filtering and old extensive list
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
|
||||
function isProfane(str) {
|
||||
const lower = str.toLowerCase().trim();
|
||||
return bannedWords.some(word => word === lower);
|
||||
return bannedWords.some(word => new RegExp(`\\b${word}\\b`).test(lower));
|
||||
}
|
||||
|
||||
function showError(input, message) {
|
||||
|
||||
Reference in New Issue
Block a user