Skip to content

Commit

Permalink
Adding noreferrer on doc links (#1709)
Browse files Browse the repository at this point in the history
Signed-off-by: manasvis <manasvis@amazon.com>
  • Loading branch information
manasvinibs authored Jun 13, 2022
1 parent b2cfb6e commit 3ff99cf
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/core/server/ui_settings/settings/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getNotificationsSettings = (): Record<string, UiSettingsParams> =>
values: {
markdownLink:
`<a href="https://help.github.com/articles/basic-writing-and-formatting-syntax/"
target="_blank" rel="noopener">` +
target="_blank" rel="noopener noreferrer">` +
i18n.translate('core.ui_settings.params.notifications.banner.markdownLinkText', {
defaultMessage: 'Markdown supported',
}) +
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'data.advancedSettings.query.queryStringOptionsText',
values: {
optionsLink:
'<a href="https://opensearch.org/docs/latest/opensearch/query-dsl/index/" target="_blank" rel="noopener">' +
'<a href="https://opensearch.org/docs/latest/opensearch/query-dsl/index/" target="_blank" rel="noopener noreferrer">' +
i18n.translate('data.advancedSettings.query.queryStringOptions.optionsLinkText', {
defaultMessage: 'Options',
}) +
Expand Down Expand Up @@ -163,7 +163,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'data.advancedSettings.sortOptionsText',
values: {
optionsLink:
'<a href="https://opensearch.org/docs/latest/opensearch/ux/#sort-results" target="_blank" rel="noopener">' +
'<a href="https://opensearch.org/docs/latest/opensearch/ux/#sort-results" target="_blank" rel="noopener noreferrer">' +
i18n.translate('data.advancedSettings.sortOptions.optionsLinkText', {
defaultMessage: 'Options',
}) +
Expand Down Expand Up @@ -245,7 +245,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
setRequestReferenceSetting: `<strong>${UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE}</strong>`,
customSettingValue: '"custom"',
requestPreferenceLink:
'<a href="https://opensearch.org/docs/latest/opensearch/popular-api" target="_blank" rel="noopener">' +
'<a href="https://opensearch.org/docs/latest/opensearch/popular-api" target="_blank" rel="noopener noreferrer">' +
i18n.translate(
'data.advancedSettings.courier.customRequestPreference.requestPreferenceLinkText',
{
Expand All @@ -270,7 +270,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
'Set to 0 to disable this config and use the OpenSearch default.',
values: {
maxRequestsLink: `<a href="https://opensearch.org/docs/latest/opensearch/query-dsl/full-text/#multi-match"
target="_blank" rel="noopener" >max_concurrent_shard_requests</a>`,
target="_blank" rel="noopener noreferrer" >max_concurrent_shard_requests</a>`,
},
}),
category: ['search'],
Expand All @@ -293,7 +293,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
[UI_SETTINGS.SEARCH_INCLUDE_FROZEN]: {
name: 'Search in frozen indices',
description: `Will include <a href="https://opensearch.org/docs/latest/opensearch/index-data"
target="_blank" rel="noopener">frozen indices</a> in results if enabled. Searching through frozen indices
target="_blank" rel="noopener noreferrer">frozen indices</a> in results if enabled. Searching through frozen indices
might increase the search time.`,
value: false,
category: ['search'],
Expand Down Expand Up @@ -642,7 +642,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
values: {
acceptedFormatsLink:
`<a href="https://opensearch.org/docs/latest/opensearch/units"
target="_blank" rel="noopener">` +
target="_blank" rel="noopener noreferrer">` +
i18n.translate('data.advancedSettings.timepicker.quickRanges.acceptedFormatsLinkText', {
defaultMessage: 'accepted formats',
}) +
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/plugins/home/public/application/components/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ export class Welcome extends React.Component<Props> {
<EuiLink
href={telemetry.telemetryConstants.getPrivacyStatementUrl()}
target="_blank"
rel="noopener"
>
<FormattedMessage
id="home.dataManagementDisclaimerPrivacyLink"
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/maps_legacy/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
values: {
cellDimensionsLink:
`<a href="https://opensearch.org/docs/latest/dashboards/maptiles"
target="_blank" rel="noopener">` +
target="_blank" rel="noopener noreferrer">` +
i18n.translate(
'maps_legacy.advancedSettings.visualization.tileMap.maxPrecision.cellDimensionsLinkText',
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/plugins/telemetry/public/components/opt_in_message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class OptInMessage extends React.PureComponent {
defaultMessage="Want to help us improve the OpenSearch Stack? Data usage collection is currently disabled. Enabling data usage collection helps us manage and improve our products and services. See our {privacyStatementLink} for more details."
values={{
privacyStatementLink: (
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank" rel="noopener">
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
<FormattedMessage
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
defaultMessage="Privacy Statement"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ export class OptedInNoticeBanner extends React.PureComponent<Props> {
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: (
<EuiLink
onClick={onSeenBanner}
href={PRIVACY_STATEMENT_URL}
target="_blank"
rel="noopener"
>
<EuiLink onClick={onSeenBanner} href={PRIVACY_STATEMENT_URL} target="_blank">
<FormattedMessage
id="telemetry.telemetryOptedInPrivacyStatement"
defaultMessage="Privacy Statement"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function DefaultEditorAggSelect({

const helpLink = value && aggHelpLink && (
<EuiText size="xs">
<EuiLink href={aggHelpLink} target="_blank" rel="noopener">
<EuiLink href={aggHelpLink} target="_blank">
<FormattedMessage
id="visDefaultEditor.aggSelect.helpLinkLabel"
defaultMessage="{aggTitle} help"
Expand Down

0 comments on commit 3ff99cf

Please sign in to comment.