Skip to content

Render a safe markdown subset in BSOD AI answers - #387

Merged
faratech merged 1 commit into
mainfrom
bsod-ai-markdown
Oct 31, 2026
Merged

faratech merged 1 commit into
mainfrom
bsod-ai-markdown

Conversation

@faratech

Copy link
Copy Markdown
Owner

Summary

  • The scrubber keeps **bold**, `code` and - bullets; links, images, HTML, headings, fences and italics are still removed.
  • Markers are looked through when checking for URLs and destructive commands, so a marker cannot hide either.
  • ChatMarkdown renders the subset as React elements (never HTML). An unmatched marker is dropped while an answer streams.
  • The prompt now tells the model what formatting it may use.

Chat stays off unless BSOD_AI_CHAT_ENABLED is set. npm run check passes (942 tests).

🤖 Generated with Claude Code

The scrubber now keeps **bold**, `inline code` and "- " bullets and still
removes links, images, HTML, headings, fences and italics. Markers are
looked through when checking for links and destructive commands, so a
marker inside a URL or command cannot hide it. The chat turns the subset
into React elements (ChatMarkdown), never HTML; an unmatched marker while
an answer streams is dropped until its partner arrives. The prompt tells
the model which formatting it may use.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@faratech
faratech merged commit e288c2d into main Oct 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant