Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publication and workspace cards on homepage are missing the rel="noopener noreferrer"attribute (#3336) #3344

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

frano-m
Copy link
Collaborator

@frano-m frano-m commented Nov 8, 2024

Closes #3336.

image image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added noopener noreferrer to Datasets.

@@ -35,7 +36,10 @@ export const SectionDatasets = ({
<NLink href={CONSORTIA_ROADMAP} legacyBehavior passHref>
<ButtonSecondary href="passHref">Consortia Roadmap</ButtonSecondary>
</NLink>
<ButtonSecondary href={`${portalURL}${EXPLORE_DATASETS}`}>
<ButtonSecondary
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added noopener noreferrer to Explore Datasets.

@@ -21,6 +24,7 @@ export const SectionPublications = (): JSX.Element => {
<Button
color="primary"
href={ADD_PUBLICATION}
rel={REL_ATTRIBUTE.NO_OPENER_NO_REFERRER}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added noopener noreferrer to "Add Publication" link.

@@ -29,6 +32,7 @@ export const Contribute = ({ slug }: ContributeProps): JSX.Element => {
disabled={slug?.length === 0}
href={getGitHubUrl(slug)}
startIcon={<CodePullRequestIcon color="inkLight" />}
rel={REL_ATTRIBUTE.NO_OPENER_NO_REFERRER}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added noopener noreferrer to "Make a contribution" link.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unused.

import { Button as PrimaryButton } from "./button.styles";

export const Button = (): JSX.Element => {
return (
<PrimaryButton
color="primary"
href="https://github.com/anvilproject/anvil-portal/issues/new/?template=add-a-publication.md"
rel={REL_ATTRIBUTE.NO_OPENER_NO_REFERRER}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added noopener noreferrer to "Add Your Publication".

Copy link
Collaborator

@NoopDog NoopDog left a comment

Choose a reason for hiding this comment

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

Nice, thx @frano-m

@NoopDog NoopDog merged commit 3cf02de into main Nov 8, 2024
4 checks passed
@NoopDog NoopDog deleted the fran/3336-external-links branch November 8, 2024 08:40
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.

Publication and workspace cards on homepage are missing the rel="noopener noreferrer"attribute
2 participants