From fbe202bdbfbc03b1816e21a5b6c1a0538990dfc9 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Wed, 31 May 2023 13:49:39 -0400 Subject: [PATCH] Adds missing rel="noopener noreferrer" to each link element with target="_blank" (#13959) --- awx/ui/.eslintrc.json | 3 ++- awx/ui/src/components/AppContainer/PageHeaderToolbar.js | 1 + awx/ui/src/components/Search/AdvancedSearch.js | 1 + awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js | 1 + .../src/screens/Inventory/shared/ConstructedInventoryHint.js | 1 + .../NotificationTemplate/shared/Notifications.helptext.js | 2 +- .../Subscription/SubscriptionDetail/SubscriptionDetail.js | 1 + .../Setting/Subscription/SubscriptionEdit/AnalyticsStep.js | 2 ++ .../Setting/Subscription/SubscriptionEdit/SubscriptionStep.js | 4 ++++ awx/ui/src/screens/Template/Survey/SurveyQuestionForm.js | 2 +- .../WorkflowJobTemplateVisualizer/VisualizerToolbar.js | 1 + awx/ui/src/screens/Template/shared/JobTemplate.helptext.js | 2 +- awx/ui/src/screens/TopologyView/Tooltip.js | 1 + 13 files changed, 18 insertions(+), 4 deletions(-) diff --git a/awx/ui/.eslintrc.json b/awx/ui/.eslintrc.json index 85eb903553..0e9a7880f5 100644 --- a/awx/ui/.eslintrc.json +++ b/awx/ui/.eslintrc.json @@ -99,7 +99,8 @@ "fieldName", "splitButtonVariant", "pageKey", - "textId" + "textId", + "rel" ], "ignore": [ "Ansible", diff --git a/awx/ui/src/components/AppContainer/PageHeaderToolbar.js b/awx/ui/src/components/AppContainer/PageHeaderToolbar.js index 2d87d596a5..cf3862e348 100644 --- a/awx/ui/src/components/AppContainer/PageHeaderToolbar.js +++ b/awx/ui/src/components/AppContainer/PageHeaderToolbar.js @@ -112,6 +112,7 @@ function PageHeaderToolbar({ target="_blank" href={`${getDocsBaseUrl(config)}/html/userguide/index.html`} ouiaId="help-dropdown-item" + rel="noopener noreferrer" > {t`Help`} , diff --git a/awx/ui/src/components/Search/AdvancedSearch.js b/awx/ui/src/components/Search/AdvancedSearch.js index 88da024b59..d7d448316c 100644 --- a/awx/ui/src/components/Search/AdvancedSearch.js +++ b/awx/ui/src/components/Search/AdvancedSearch.js @@ -322,6 +322,7 @@ function AdvancedSearch({ variant="plain" target="_blank" href={`${getDocsBaseUrl(config)}/html/userguide/search_sort.html`} + rel="noopener noreferrer" > diff --git a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js index 7d727a1c88..5284bf1bab 100644 --- a/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js +++ b/awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js @@ -258,6 +258,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) { target="_blank" variant="secondary" dataCy="install-bundle-download-button" + rel="noopener noreferrer" > diff --git a/awx/ui/src/screens/Inventory/shared/ConstructedInventoryHint.js b/awx/ui/src/screens/Inventory/shared/ConstructedInventoryHint.js index be22d4ba13..c6a150bdd8 100644 --- a/awx/ui/src/screens/Inventory/shared/ConstructedInventoryHint.js +++ b/awx/ui/src/screens/Inventory/shared/ConstructedInventoryHint.js @@ -43,6 +43,7 @@ function ConstructedInventoryHint() { )}/html/userguide/inventories.html#constructed-inventories`} component="a" target="_blank" + rel="noopener noreferrer" > {t`View constructed inventory documentation here`}{' '} diff --git a/awx/ui/src/screens/NotificationTemplate/shared/Notifications.helptext.js b/awx/ui/src/screens/NotificationTemplate/shared/Notifications.helptext.js index bb06445af2..7063e8fb45 100644 --- a/awx/ui/src/screens/NotificationTemplate/shared/Notifications.helptext.js +++ b/awx/ui/src/screens/NotificationTemplate/shared/Notifications.helptext.js @@ -35,7 +35,7 @@ const helpText = () => ({ {t`documentation`}{' '} {t`for more information.`} diff --git a/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js b/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js index 6f16cbbb4d..6e28f6c42d 100644 --- a/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js +++ b/awx/ui/src/screens/Setting/Subscription/SubscriptionDetail/SubscriptionDetail.js @@ -206,6 +206,7 @@ function SubscriptionDetail() { href="https://www.redhat.com/contact" variant="link" target="_blank" + rel="noopener noreferrer" isInline > contact us. diff --git a/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.js b/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.js index 89a6176a45..c2d442f8eb 100644 --- a/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.js +++ b/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.js @@ -46,6 +46,7 @@ function AnalyticsStep() { isInline ouiaId="tower-documentation-link" target="_blank" + rel="noopener noreferrer" > this Tower documentation page @@ -116,6 +117,7 @@ function AnalyticsStep() { target="_blank" variant="secondary" ouiaId="analytics-link" + rel="noopener noreferrer" > Learn more about Automation Analytics diff --git a/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js b/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js index 333a7939fd..3005cc9966 100644 --- a/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js +++ b/awx/ui/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionStep.js @@ -70,6 +70,7 @@ function SubscriptionStep() { ouiaId="request-subscription-button" target="_blank" variant="secondary" + rel="noopener noreferrer" > {t`Request subscription`} @@ -103,6 +104,7 @@ function SubscriptionStep() { variant="link" target="_blank" ouiaId="subscription-allocations-link" + rel="noopener noreferrer" isInline > subscription allocations @@ -127,6 +129,7 @@ function SubscriptionStep() { href="https://access.redhat.com/management/subscription_allocations" variant="link" target="_blank" + rel="noopener noreferrer" isInline ouiaId="subscription-allocations-link" > @@ -140,6 +143,7 @@ function SubscriptionStep() { )}/html/userguide/import_license.html`} variant="link" target="_blank" + rel="noopener noreferrer" ouiaId="import-license-link" isInline > diff --git a/awx/ui/src/screens/Template/Survey/SurveyQuestionForm.js b/awx/ui/src/screens/Template/Survey/SurveyQuestionForm.js index 1e37238baa..17664c4d56 100644 --- a/awx/ui/src/screens/Template/Survey/SurveyQuestionForm.js +++ b/awx/ui/src/screens/Template/Survey/SurveyQuestionForm.js @@ -264,7 +264,7 @@ function SurveyQuestionForm({ config )}/html/userguide/job_templates.html#surveys`} target="_blank" - rel="noreferrer" + rel="noopener noreferrer" > {t`documentation`} {' '} diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.js b/awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.js index 02e0187236..80ea5a56df 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerToolbar.js @@ -108,6 +108,7 @@ function VisualizerToolbar({ variant="plain" component="a" target="_blank" + rel="noopener noreferrer" href={`${getDocsBaseUrl( config )}/html/userguide/workflow_templates.html#ug-wf-editor`} diff --git a/awx/ui/src/screens/Template/shared/JobTemplate.helptext.js b/awx/ui/src/screens/Template/shared/JobTemplate.helptext.js index 8aa8b48db3..2d92bb41f0 100644 --- a/awx/ui/src/screens/Template/shared/JobTemplate.helptext.js +++ b/awx/ui/src/screens/Template/shared/JobTemplate.helptext.js @@ -56,7 +56,7 @@ const jtHelpTextStrings = () => ({ {t`documentation`} {' '} diff --git a/awx/ui/src/screens/TopologyView/Tooltip.js b/awx/ui/src/screens/TopologyView/Tooltip.js index f676197ba6..07f79634b2 100644 --- a/awx/ui/src/screens/TopologyView/Tooltip.js +++ b/awx/ui/src/screens/TopologyView/Tooltip.js @@ -254,6 +254,7 @@ function Tooltip({ href={`${instanceDetail.related?.install_bundle}`} target="_blank" variant="secondary" + rel="noopener noreferrer" >