Skip to content

fix(explorer): allow clicks on links#104919

Merged
roaga merged 1 commit intomasterfrom
explorer/fix-links
Dec 13, 2025
Merged

fix(explorer): allow clicks on links#104919
roaga merged 1 commit intomasterfrom
explorer/fix-links

Conversation

@roaga
Copy link
Copy Markdown
Contributor

@roaga roaga commented Dec 13, 2025

Closes AIML-1653

@roaga roaga requested a review from a team as a code owner December 13, 2025 00:52
@linear
Copy link
Copy Markdown

linear bot commented Dec 13, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 13, 2025

if (href.startsWith('/')) {
navigate(href);
onNavigate?.();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Protocol-relative URLs incorrectly treated as internal links

The condition href.startsWith('/') matches protocol-relative URLs like //example.com since they begin with /. If an LLM response contains such a link, it would be passed to navigate() for client-side routing instead of window.open(), causing unexpected navigation behavior rather than opening the external link in a new tab. A more robust check would exclude hrefs starting with //.

Fix in Cursor Fix in Web

@roaga roaga merged commit ef486dd into master Dec 13, 2025
50 checks passed
@roaga roaga deleted the explorer/fix-links branch December 13, 2025 01:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants