Bug: External links use react-router Link (wrong) and missing rel on some targets #3

Closed
opened 2026-06-17 14:00:14 +00:00 by abumahid · 0 comments
Owner

Description

Several external URLs are currently rendered using React Router's <Link> component instead of standard anchor (<a>) tags.

Additionally, some external links that open in a new tab are missing the required:

rel="noopener noreferrer"

attribute.

Impact

  • External navigation may behave incorrectly when using React Router's <Link>.
  • Missing noopener exposes the application to reverse tab-napping attacks.
  • Inconsistent implementation across the codebase.
  • Reduced maintainability and security posture.

Locations

Known Examples

  • src/components/home/TeamSection.tsx (around lines ~88–96)

    • External social profile links use React Router <Link>.
    • Missing rel="noopener noreferrer".
  • src/pages/BlogArticle.tsx

    • Contains external links.
    • Some links have proper rel attributes while others do not.

Additional Audit Required

Search the entire codebase for:

  • <Link to="https://...">
  • <Link to="http://...">
  • External URLs opened with target="_blank" but without rel="noopener noreferrer"

Suggested Fix

Replace

<Link
  to="https://github.com/example"
  target="_blank"
>
  GitHub
</Link>

With

<a
  href="https://github.com/example"
  target="_blank"
  rel="noopener noreferrer"
>
  GitHub
</a>

Acceptance Criteria

  • All external URLs use <a href> instead of React Router <Link>.
  • Every external link opened in a new tab includes rel="noopener noreferrer".
  • Internal application routes continue using React Router <Link>.
  • No navigation behavior is broken.
  • All identified occurrences have been audited and fixed.
  • No new ESLint warnings or errors are introduced.

Local Verification

Run the following commands before creating the PR.

Build

npm run build

Lint Check

npm run lint
## Description Several external URLs are currently rendered using React Router's `<Link>` component instead of standard anchor (`<a>`) tags. Additionally, some external links that open in a new tab are missing the required: ```html rel="noopener noreferrer" ``` attribute. ## Impact * External navigation may behave incorrectly when using React Router's `<Link>`. * Missing `noopener` exposes the application to reverse tab-napping attacks. * Inconsistent implementation across the codebase. * Reduced maintainability and security posture. ## Locations ### Known Examples * `src/components/home/TeamSection.tsx` (around lines ~88–96) * External social profile links use React Router `<Link>`. * Missing `rel="noopener noreferrer"`. * `src/pages/BlogArticle.tsx` * Contains external links. * Some links have proper `rel` attributes while others do not. ### Additional Audit Required Search the entire codebase for: * `<Link to="https://...">` * `<Link to="http://...">` * External URLs opened with `target="_blank"` but without `rel="noopener noreferrer"` ## Suggested Fix ### Replace ```tsx <Link to="https://github.com/example" target="_blank" > GitHub </Link> ``` ### With ```tsx <a href="https://github.com/example" target="_blank" rel="noopener noreferrer" > GitHub </a> ``` ## Acceptance Criteria * [ ] All external URLs use `<a href>` instead of React Router `<Link>`. * [ ] Every external link opened in a new tab includes `rel="noopener noreferrer"`. * [ ] Internal application routes continue using React Router `<Link>`. * [ ] No navigation behavior is broken. * [ ] All identified occurrences have been audited and fixed. * [ ] No new ESLint warnings or errors are introduced. --- ## Local Verification Run the following commands before creating the PR. ### Build ```bash npm run build ``` ### Lint Check ```bash npm run lint ```
abumahid added the Kind/Bug label 2026-06-17 14:00:14 +00:00
abumahid added this to the techzaa-frontend project 2026-06-17 14:00:14 +00:00
abumahid moved this to Done in techzaa-frontend on 2026-06-17 16:22:34 +00:00
rimi closed this issue 2026-06-17 16:25:22 +00:00
Sign in to join this conversation.