// HTML semantic container extraction // Extracts the main content area before feeding to pandoc // Uses balanced tag counting for nested elements // ── Prompt injection hardening ────────────────────────────────────────── // Strip known injection vectors from HTML before content extraction. // These are deterministic, zero-cost filters — no ML, no arms race. // They remove delivery mechanisms, not payload content. export function sanitizeInjectionVectors(html: string): string { let out = html; // 1. Remove