From b925114923c2468bf2c3c4a3abd6922f09bfdb73 Mon Sep 17 00:00:00 2001 From: whitlocktech Date: Sat, 27 Jun 2026 10:45:21 -0500 Subject: [PATCH] Wiki Phase 1: categories, drafts/publish, HTML sanitization Foundation & safety phase of the wiki upgrade (see WIKI_UPGRADE.md). Schema (additive, idempotent via ensureSchema): - new wiki_categories table; wiki_pages gains category_id, excerpt, published, published_at, sort_order, and a FULLTEXT index - migration ALTERs guarded with IF NOT EXISTS for existing databases - seed reworked into 4 sections with the 8 starter pages assigned Security: - new utils/sanitizeHtml.js (sanitize-html allowlist); wiki bodies are sanitized on every save, and the article renders through DOMPurify - strips