From 3ff99cf9c519676d7ae2618a4cea0e81f8ca0775 Mon Sep 17 00:00:00 2001 From: Manasvini B Suryanarayana <105884062+manasvinibs@users.noreply.github.com> Date: Mon, 13 Jun 2022 11:32:50 -0700 Subject: [PATCH] Adding noreferrer on doc links (#1709) Signed-off-by: manasvis --- .../server/ui_settings/settings/notifications.ts | 2 +- src/plugins/data/server/ui_settings.ts | 12 ++++++------ .../components/__snapshots__/welcome.test.tsx.snap | 2 -- .../home/public/application/components/welcome.tsx | 1 - src/plugins/maps_legacy/server/ui_settings.ts | 2 +- .../__snapshots__/opt_in_message.test.tsx.snap | 1 - .../opted_in_notice_banner.test.tsx.snap | 1 - .../telemetry/public/components/opt_in_message.tsx | 2 +- .../public/components/opted_in_notice_banner.tsx | 7 +------ .../public/components/agg_select.tsx | 2 +- 10 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/core/server/ui_settings/settings/notifications.ts b/src/core/server/ui_settings/settings/notifications.ts index b7441ee6ed16..19a382af4c33 100644 --- a/src/core/server/ui_settings/settings/notifications.ts +++ b/src/core/server/ui_settings/settings/notifications.ts @@ -49,7 +49,7 @@ export const getNotificationsSettings = (): Record => values: { markdownLink: `` + + target="_blank" rel="noopener noreferrer">` + i18n.translate('core.ui_settings.params.notifications.banner.markdownLinkText', { defaultMessage: 'Markdown supported', }) + diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index d259b2b0d7df..77f4afd11887 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -104,7 +104,7 @@ export function getUiSettings(): Record> { 'data.advancedSettings.query.queryStringOptionsText', values: { optionsLink: - '' + + '' + i18n.translate('data.advancedSettings.query.queryStringOptions.optionsLinkText', { defaultMessage: 'Options', }) + @@ -163,7 +163,7 @@ export function getUiSettings(): Record> { 'data.advancedSettings.sortOptionsText', values: { optionsLink: - '' + + '' + i18n.translate('data.advancedSettings.sortOptions.optionsLinkText', { defaultMessage: 'Options', }) + @@ -245,7 +245,7 @@ export function getUiSettings(): Record> { setRequestReferenceSetting: `${UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE}`, customSettingValue: '"custom"', requestPreferenceLink: - '' + + '' + i18n.translate( 'data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText', { @@ -270,7 +270,7 @@ export function getUiSettings(): Record> { 'Set to 0 to disable this config and use the OpenSearch default.', values: { maxRequestsLink: `max_concurrent_shard_requests`, + target="_blank" rel="noopener noreferrer" >max_concurrent_shard_requests`, }, }), category: ['search'], @@ -293,7 +293,7 @@ export function getUiSettings(): Record> { [UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: { name: 'Search in frozen indices', description: `Will include frozen indices in results if enabled. Searching through frozen indices + target="_blank" rel="noopener noreferrer">frozen indices in results if enabled. Searching through frozen indices might increase the search time.`, value: false, category: ['search'], @@ -642,7 +642,7 @@ export function getUiSettings(): Record> { values: { acceptedFormatsLink: `` + + target="_blank" rel="noopener noreferrer">` + i18n.translate('data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', { defaultMessage: 'accepted formats', }) + diff --git a/src/plugins/home/public/application/components/__snapshots__/welcome.test.tsx.snap b/src/plugins/home/public/application/components/__snapshots__/welcome.test.tsx.snap index d4b81f3b3da3..2b0de11d7f18 100644 --- a/src/plugins/home/public/application/components/__snapshots__/welcome.test.tsx.snap +++ b/src/plugins/home/public/application/components/__snapshots__/welcome.test.tsx.snap @@ -135,7 +135,6 @@ exports[`Welcome page should render a Welcome screen with the telemetry discla values={Object {}} /> { > { values: { cellDimensionsLink: `` + + target="_blank" rel="noopener noreferrer">` + i18n.translate( 'maps_legacy.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText', { diff --git a/src/plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap b/src/plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap index 31b5530c3dad..983db69d0c5c 100644 --- a/src/plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap +++ b/src/plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap @@ -9,7 +9,6 @@ exports[`OptInMessage renders as expected 1`] = ` Object { "privacyStatementLink": + { defaultMessage="To learn about how usage data helps us manage and improve our products and services, see our {privacyStatementLink}. To stop collection, {disableLink}." values={{ privacyStatementLink: ( - + - +