mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
less intense filtering
This commit is contained in:
@@ -60,9 +60,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
function isProfane(str) {
|
||||
const lower = str.toLowerCase();
|
||||
return bannedWords.some(word => lower.includes(word));
|
||||
function isProfane(str) {
|
||||
const lower = str.toLowerCase().trim();
|
||||
return bannedWords.some(word => word === lower);
|
||||
}
|
||||
|
||||
function showError(input, message) {
|
||||
|
||||
@@ -114,8 +114,8 @@
|
||||
// ---- DOM refs ----
|
||||
|
||||
function isProfane(str) {
|
||||
const lower = str.toLowerCase();
|
||||
return bannedWords.some(word => lower.includes(word));
|
||||
const lower = str.toLowerCase().trim();
|
||||
return bannedWords.some(word => word === lower);
|
||||
}
|
||||
const ingredientContainer = document.getElementById('ingredients-container');
|
||||
const stepsContainer = document.getElementById('steps-container');
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
// ---- DOM refs ----
|
||||
|
||||
function isProfane(str) {
|
||||
const lower = str.toLowerCase();
|
||||
return bannedWords.some(word => lower.includes(word));
|
||||
const lower = str.toLowerCase().trim();
|
||||
return bannedWords.some(word => word === lower);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user