From f9a6255bc8b73c3426b5198c08e7b1e4f0017d4e Mon Sep 17 00:00:00 2001 From: Greg Date: Sat, 10 May 2025 12:58:01 +0200 Subject: [PATCH] feat: implement attendance tracking UI with guest management system --- static/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/app.js b/static/app.js index 49d43ec..c9eba3a 100644 --- a/static/app.js +++ b/static/app.js @@ -80,11 +80,12 @@ function renderTable() { let value = e.target.value; // Only allow plain text, disallow HTML/script tags, max 50 chars if (//.test(value) || /["'`\\]/.test(value)) { - alert('Guest name cannot contain code or special characters like <, >, ", \\', or backticks.'); + alert("Guest name cannot contain code or special characters like <, >, \", \\\\, or backticks."); guestNameInput.value = data.guestNames[date] || ''; return; } - if (!/^([\p{L}\p{N}\s\-\.]+)$/u.test(value)) { + // Only allow a-z, A-Z, 0-9, spaces, hyphens, periods + if (!/^([a-zA-Z0-9 .-]+)$/.test(value)) { alert('Guest name can only contain letters, numbers, spaces, hyphens, and periods.'); guestNameInput.value = data.guestNames[date] || ''; return;