Commit Graph

1 Commits

  • fix(coding-agent): sanitize markdown links in exported session HTML (#3532)
    marked v15 does not filter dangerous URL protocols. The default link
    renderer passes href values through verbatim, so markdown like
    `[click](javascript:alert(1))` renders as a clickable XSS link in
    shared/exported session HTML.
    
    Add custom link and image renderers that:
    - Block javascript:, vbscript:, and data: protocol URLs
    - Escape href/title/alt attributes via escapeHtml()
    
    Also escape img.mimeType in session image rendering to prevent
    attribute breakout from crafted session JSONL.
    
    Fixes #3531