Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/externalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Props =

export function ExternalLink({children, ...props}: Props) {
return (
<a {...props}>
<a target="_blank" rel="noopener noreferrer" {...props}>
Copy link

Choose a reason for hiding this comment

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

Bug: Props spread overrides target and rel security attributes

The target="_blank" and rel="noopener noreferrer" attributes are placed before {...props} in the JSX element. In React, later attributes override earlier ones, so any target or rel passed through props will override these values. This contradicts the PR's stated purpose of ensuring external links open in a new tab, and the security protection from rel="noopener noreferrer" can be bypassed. The attributes would need to come after {...props} to be enforced.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

thats fine if it needs to be overridden

{children}
<span className="icon icon-external-link">
<svg viewBox="0 0 24 24" width="14" height="14" className="ml-1 inline">
Expand Down
Loading