less intense filtering

This commit is contained in:
durn
2026-04-25 13:18:31 -06:00
parent 716499ffca
commit 1e86e42c67
3 changed files with 7 additions and 7 deletions
@@ -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);
}