//! Markdown rendering helpers for creator content.
//!
//! Wraps `docengine` with media URL rewriting so relative image/video
//! references in markdown (``) resolve to CDN URLs.
//!
//! Sanitization policy, deliberate: creator
//! markdown (blog posts, issues, project sections) is rendered via
//! `docengine::render_permissive`, which runs `ammonia` (strips script /
//! event-handlers / dangerous URL schemes) but PERMITS ordinary external
//! `http(s)`/`mailto` links, creators legitimately link out from prose. This is
//! intentionally MORE permissive than the custom-pages surface, which uses a
//! closed-system sanitizer restricting URLs to on-platform targets. Both paths are
//! XSS-safe; they differ only in whether external links are allowed, and that
//! difference is by design (long-form prose vs. a templated page builder). Keep the
//! two policies distinct rather than collapsing them.
use crate::db::UserId;
/// Render creator-authored markdown to HTML with media URL resolution.
///
/// Pipeline:
/// 1. Rewrite relative `` references to absolute CDN URLs
/// 2. Render markdown to HTML via `docengine::render_permissive`
/// 3. Strip off-platform media loads (tracking pixels) via
/// `docengine::restrict_media_hosts`
/// 4. Convert `
` tags with video extensions to `