diff --git a/public/checklist.html b/public/checklist.html
index 3d0a89d..1a93020 100644
--- a/public/checklist.html
+++ b/public/checklist.html
@@ -112,8 +112,11 @@
-
diff --git a/routes/settings.js b/routes/settings.js
index c7d68b3..6a41d87 100644
--- a/routes/settings.js
+++ b/routes/settings.js
@@ -7,6 +7,14 @@ const Movie = require("../models/Movie");
const router = express.Router();
const ACTIVE_YEAR_KEY = "active_oscar_year";
+const COMPLETION_MODAL_KEY = "completion_modal_content";
+
+const DEFAULT_COMPLETION_MODAL = Object.freeze({
+ title: "Félicitations! very nice 🎉🎉🎉",
+ bodyText: "",
+ videoSrc: "video/reward.mp4",
+ bodyHtml: "",
+});
function parseOscarYear(raw) {
if (raw === undefined || raw === null || raw === "") return null;
@@ -16,6 +24,34 @@ function parseOscarYear(raw) {
return n;
}
+function sanitizeHtml(raw) {
+ // Basic, defensive sanitization (admin-controlled input, rendered for all users).
+ // We remove script tags and inline event handlers. This is not a complete HTML sanitizer.
+ const html = String(raw || "");
+ const withoutScripts = html.replace(/