Skip to content

fix: open external chat links in a new tab - #541

Open
Vidon212 wants to merge 1 commit into
google:mainfrom
Vidon212:fix/chat-external-links
Open

Vidon212 wants to merge 1 commit into
google:mainfrom
Vidon212:fix/chat-external-links

Conversation

@Vidon212

@Vidon212 Vidon212 commented Oct 4, 2026

Copy link
Copy Markdown

Summary

Clicking an HTTP/HTTPS link in a chat response navigates away from ADK web. Open these links in a new tab with target="_blank" and rel="noopener noreferrer" after each sanitized Markdown render, including streamed message updates.

Preserve existing relation tokens and leave relative, fragment, and email links unchanged. The change uses the Markdown component's render-completion event and keeps Angular's sanitization enabled.

Fixes google/adk-python#4580

Validation

  • Added regression coverage for Markdown links, autolinks, bare URLs, HTML anchors, streamed updates, internal/email links, and unsafe URL sanitization.
  • Before the fix, the two new external-link tests failed.
  • npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI: 781 passed, 37 skipped.
  • npm run build: passed with dependency optimization warnings.
  • git diff --check: passed.

@google-cla

google-cla Bot commented Oct 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

adk web: Links in chat responses should open in a new tab

1 participant