Skip to content

Commit

Permalink
fix: added rel="noopener noreferrer" to external links for security a…
Browse files Browse the repository at this point in the history
…nd privacy
  • Loading branch information
wesenbergg committed Jan 28, 2025
1 parent d6ad2c2 commit 664e3e9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default function Footer() {
<a
href="https://discord.gg/deno"
target="_blank"
rel="noopener noreferrer"
aria-label="Deno SaaSKit on Discord"
class="link-styles"
>
Expand All @@ -74,6 +75,7 @@ export default function Footer() {
<a
href="https://github.com/denoland/saaskit"
target="_blank"
rel="noopener noreferrer"
aria-label="Deno SaaSKit repo on GitHub"
class="link-styles"
>
Expand Down
1 change: 1 addition & 0 deletions islands/ItemsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function ItemSummary(props: ItemSummaryProps) {
class="hover:underline text-gray-500 after:content-['_↗']"
href={props.item.url}
target="_blank"
rel="noopener noreferrer"
>
{new URL(props.item.url).host}
</a>
Expand Down
4 changes: 4 additions & 0 deletions plugins/blog/components/Share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function Share(props: { url: URL; title: string }) {
encodeURIComponent(props.url.href)
}`}
target="_blank"
rel="noopener noreferrer"
aria-label={`Share ${props.title} on Facebook`}
>
<IconBrandFacebook />
Expand All @@ -28,6 +29,7 @@ export default function Share(props: { url: URL; title: string }) {
encodeURIComponent(props.url.href)
}&title=${encodeURIComponent(props.title)}`}
target="_blank"
rel="noopener noreferrer"
aria-label={`Share ${props.title} on LinkedIn`}
>
<IconBrandLinkedin />
Expand All @@ -37,6 +39,7 @@ export default function Share(props: { url: URL; title: string }) {
encodeURIComponent(props.url.href)
}&title=${encodeURIComponent(props.title)}`}
target="_blank"
rel="noopener noreferrer"
aria-label={`Share ${props.title} on Reddit`}
>
<IconBrandReddit />
Expand All @@ -46,6 +49,7 @@ export default function Share(props: { url: URL; title: string }) {
encodeURIComponent(props.url.href)
}&text=${encodeURIComponent(props.title)}`}
target="_blank"
rel="noopener noreferrer"
aria-label={`Share ${props.title} on Twitter`}
>
<IconBrandTwitter />
Expand Down
1 change: 1 addition & 0 deletions routes/users/[login].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function UserProfile(props: UserProfileProps) {
aria-label={`${props.login}'s GitHub profile`}
class="link-styles"
target="_blank"
rel="noopener noreferrer"
>
<IconBrandGithub class="w-6" />
</a>
Expand Down

0 comments on commit 664e3e9

Please sign in to comment.