// sanitizeHtml.js — the single chokepoint for turning user-authored // markdown into DOM-bound HTML. // // Security audit 0026 (finding C1, Critical): every `marked.parse(...)` // result that reaches an `innerHTML` / `dangerouslySetInnerHTML` sink was // previously written raw. `marked` passes through embedded HTML and // `javascript:`/event-handler attributes verbatim, so any user-authored // document (RFC body, proposal body, proposed_use_case, transcript) was a // stored-XSS vector — a contributor's payload executed in the session of // whoever viewed it, including an admin/owner during review. // // Fix: route EVERY markdown render through `renderMarkdown` (or, for // already-rendered HTML, `sanitizeHtml`). DOMPurify's defaults already // strip