Skip to content

Fix missing noopener on external chat markdown links#21

Draft
sabraman wants to merge 1 commit intomaria-rcks:mainfrom
sabraman:fix/chat-markdown-noopener
Draft

Fix missing noopener on external chat markdown links#21
sabraman wants to merge 1 commit intomaria-rcks:mainfrom
sabraman:fix/chat-markdown-noopener

Conversation

@sabraman
Copy link
Copy Markdown

Summary

External links rendered by ChatMarkdown opened in a new tab with rel="noreferrer" but without noopener.

This path is used for links that are not resolved to local workspace files, so the web UI was missing the standard hardening that prevents the opened page from getting a handle back to the opener.

What changed

  • add noopener alongside noreferrer for external markdown links rendered in ChatMarkdown
  • add a focused regression test that asserts the rendered anchor includes the expected new-tab attributes

Verification

  • bun x vitest run apps/web/src/components/ChatMarkdown.test.tsx
  • bun fmt --check
  • bun lint
  • bun typecheck

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