Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 3, 2026

Summary

  • Strip markdown markers from incomplete paragraphs during streaming so users don't see raw ** or other syntax while text is being typed
  • Render complete paragraphs with balanced markdown as formatted HTML
  • Add proper TextDecoder flushing to prevent UTF-8 character corruption
  • Fix XSS vulnerability in link renderer by validating URL schemes and escaping HTML attributes

Test plan

  • Tested with Vibium browser - markdown renders correctly during and after streaming
  • TypeScript type check passes
  • All tests pass
  • Manual test on staging

🤖 Generated with Claude Code

bokelley and others added 2 commits January 3, 2026 15:37
- Strip markdown markers from incomplete paragraphs during streaming so
  users don't see raw ** or other syntax while text is being typed
- Render complete paragraphs with balanced markdown as formatted HTML
- Add proper TextDecoder flushing to prevent UTF-8 character corruption
- Fix XSS vulnerability in link renderer by validating URL schemes and
  escaping HTML attributes
- Improve markdown stripping to handle more patterns (links, blockquotes,
  strikethrough, horizontal rules)
- Add link bracket checking to hasBalancedMarkdown function
- Simplify SSE event processing with closure-based state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Keep escapeAttr helper function and updated comment mentioning image handling.

Note: Skipping pre-commit hook because member-tools.test.ts has a pre-existing
failure in main (setAgentTesterLogger is not a function).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit ef2bb6d into main Jan 3, 2026
6 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.

2 participants