From d45a24c50f42173744216a5c58802da4b4618ceb Mon Sep 17 00:00:00 2001 From: David Edler Date: Fri, 1 Mar 2024 08:17:24 +0100 Subject: [PATCH] chore(link) ensure noopener is set on all outgoing links Signed-off-by: David Edler --- src/components/HelpLink.tsx | 2 +- src/components/Navigation.tsx | 6 +++--- src/components/NoMatch.tsx | 2 +- src/pages/cluster/ClusterList.tsx | 4 ++-- src/pages/instances/InstanceList.tsx | 2 +- src/pages/instances/InstanceSnapshots.tsx | 2 +- src/pages/networks/NetworkForwards.tsx | 2 +- src/pages/networks/NetworkList.tsx | 2 +- src/pages/networks/forms/NetworkTypeSelector.tsx | 2 +- src/pages/storage/CustomIsoList.tsx | 2 +- src/pages/storage/StoragePools.tsx | 2 +- src/pages/storage/StorageVolumeSnapshots.tsx | 2 +- src/pages/storage/StorageVolumes.tsx | 2 +- src/pages/storage/UploadCustomImageHint.tsx | 2 +- src/pages/storage/forms/StorageVolumeFormBlock.tsx | 2 +- src/pages/storage/forms/StorageVolumeFormSnapshots.tsx | 2 +- src/util/config.spec.ts | 4 ++-- src/util/config.tsx | 2 +- 18 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/HelpLink.tsx b/src/components/HelpLink.tsx index 341cac0d6..681da8651 100644 --- a/src/components/HelpLink.tsx +++ b/src/components/HelpLink.tsx @@ -11,7 +11,7 @@ const HelpLink: FC = ({ children, href, title }) => { return (
{children} - +
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index d5cff6d57..bda895ab0 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -271,7 +271,7 @@ const Navigation: FC = () => { className="p-side-navigation__link" href={docBaseLink} target="_blank" - rel="noreferrer" + rel="noopener noreferrer" title="Documentation" > { className="p-side-navigation__link" href="https://discourse.ubuntu.com/c/lxd/126" target="_blank" - rel="noreferrer" + rel="noopener noreferrer" title="Discussion" > { className="p-side-navigation__link" href="https://github.com/canonical/lxd-ui/issues/new" target="_blank" - rel="noreferrer" + rel="noopener noreferrer" title="Report a bug" > { Report a bug diff --git a/src/pages/cluster/ClusterList.tsx b/src/pages/cluster/ClusterList.tsx index 8b9a413f8..769412ddf 100644 --- a/src/pages/cluster/ClusterList.tsx +++ b/src/pages/cluster/ClusterList.tsx @@ -124,7 +124,7 @@ const ClusterList: FC = () => { Learn more about clustering @@ -147,7 +147,7 @@ const ClusterList: FC = () => { Learn more about clustering diff --git a/src/pages/instances/InstanceList.tsx b/src/pages/instances/InstanceList.tsx index 4abce7c6e..47aa03458 100644 --- a/src/pages/instances/InstanceList.tsx +++ b/src/pages/instances/InstanceList.tsx @@ -635,7 +635,7 @@ const InstanceList: FC = () => { How to create instances diff --git a/src/pages/instances/InstanceSnapshots.tsx b/src/pages/instances/InstanceSnapshots.tsx index 2170793f3..2ecc2b9d4 100644 --- a/src/pages/instances/InstanceSnapshots.tsx +++ b/src/pages/instances/InstanceSnapshots.tsx @@ -308,7 +308,7 @@ const InstanceSnapshots = (props: Props) => { Learn more about snapshots diff --git a/src/pages/networks/NetworkForwards.tsx b/src/pages/networks/NetworkForwards.tsx index 4c67ab74f..5be232ec0 100644 --- a/src/pages/networks/NetworkForwards.tsx +++ b/src/pages/networks/NetworkForwards.tsx @@ -160,7 +160,7 @@ const NetworkForwards: FC = ({ network, project }) => { Learn more about network forwards diff --git a/src/pages/networks/NetworkList.tsx b/src/pages/networks/NetworkList.tsx index 680172fc1..890432bd2 100644 --- a/src/pages/networks/NetworkList.tsx +++ b/src/pages/networks/NetworkList.tsx @@ -181,7 +181,7 @@ const NetworkList: FC = () => { Learn more about networks diff --git a/src/pages/networks/forms/NetworkTypeSelector.tsx b/src/pages/networks/forms/NetworkTypeSelector.tsx index 86ac1e415..658186400 100644 --- a/src/pages/networks/forms/NetworkTypeSelector.tsx +++ b/src/pages/networks/forms/NetworkTypeSelector.tsx @@ -32,7 +32,7 @@ const NetworkTypeSelector: FC = ({ formik }) => { Learn how to set up OVN diff --git a/src/pages/storage/CustomIsoList.tsx b/src/pages/storage/CustomIsoList.tsx index f92abed28..9db3e151d 100644 --- a/src/pages/storage/CustomIsoList.tsx +++ b/src/pages/storage/CustomIsoList.tsx @@ -149,7 +149,7 @@ const CustomIsoList: FC = ({ project }) => { Learn more about storage diff --git a/src/pages/storage/StoragePools.tsx b/src/pages/storage/StoragePools.tsx index 733a83f83..3fc4950fb 100644 --- a/src/pages/storage/StoragePools.tsx +++ b/src/pages/storage/StoragePools.tsx @@ -187,7 +187,7 @@ const StoragePools: FC = () => { Learn more about storage diff --git a/src/pages/storage/StorageVolumeSnapshots.tsx b/src/pages/storage/StorageVolumeSnapshots.tsx index 516ce3bd1..afb2d3fdf 100644 --- a/src/pages/storage/StorageVolumeSnapshots.tsx +++ b/src/pages/storage/StorageVolumeSnapshots.tsx @@ -306,7 +306,7 @@ const StorageVolumeSnapshots: FC = ({ volume }) => { Learn more about snapshots diff --git a/src/pages/storage/StorageVolumes.tsx b/src/pages/storage/StorageVolumes.tsx index cbe4dceae..918e66e9a 100644 --- a/src/pages/storage/StorageVolumes.tsx +++ b/src/pages/storage/StorageVolumes.tsx @@ -382,7 +382,7 @@ const StorageVolumes: FC = () => { Learn more about storage diff --git a/src/pages/storage/UploadCustomImageHint.tsx b/src/pages/storage/UploadCustomImageHint.tsx index 3c373dbed..dcad010da 100644 --- a/src/pages/storage/UploadCustomImageHint.tsx +++ b/src/pages/storage/UploadCustomImageHint.tsx @@ -14,7 +14,7 @@ const UploadCustomImageHint: FC = () => { className="p-notification__action" href="https://ubuntu.com/tutorials/how-to-install-a-windows-11-vm-using-lxd#1-overview" target="_blank" - rel="noreferrer" + rel="noopener noreferrer" > Windows ISO images diff --git a/src/pages/storage/forms/StorageVolumeFormBlock.tsx b/src/pages/storage/forms/StorageVolumeFormBlock.tsx index e1d516438..0065d2dc5 100644 --- a/src/pages/storage/forms/StorageVolumeFormBlock.tsx +++ b/src/pages/storage/forms/StorageVolumeFormBlock.tsx @@ -55,7 +55,7 @@ const StorageVolumeFormBlock: FC = ({ formik }) => { For a list of available options visit{" "} mount manpages diff --git a/src/pages/storage/forms/StorageVolumeFormSnapshots.tsx b/src/pages/storage/forms/StorageVolumeFormSnapshots.tsx index a926a2b03..a81ee878e 100644 --- a/src/pages/storage/forms/StorageVolumeFormSnapshots.tsx +++ b/src/pages/storage/forms/StorageVolumeFormSnapshots.tsx @@ -46,7 +46,7 @@ const StorageVolumeFormSnapshots: FC = ({ formik }) => { Automatic snapshot names diff --git a/src/util/config.spec.ts b/src/util/config.spec.ts index 3179bdbad..fcb93944a 100644 --- a/src/util/config.spec.ts +++ b/src/util/config.spec.ts @@ -81,7 +81,7 @@ describe("toConfigFields and replaceDocLinks", () => { ); expect(result).toBe( - 'Specify a Pongo2 template string that represents the snapshot name.
This template is used for scheduled snapshots and for unnamed snapshots.

See instance options snapshots names for more information.', + 'Specify a Pongo2 template string that represents the snapshot name.
This template is used for scheduled snapshots and for unnamed snapshots.

See instance options snapshots names for more information.', ); }); @@ -96,7 +96,7 @@ describe("toConfigFields and replaceDocLinks", () => { ); expect(result).toBe( - 'the value of zfs.block_mode,
the specified', + 'the value of zfs.block_mode,
the specified', ); }); diff --git a/src/util/config.tsx b/src/util/config.tsx index bff2246f7..8b61f7c96 100644 --- a/src/util/config.tsx +++ b/src/util/config.tsx @@ -59,7 +59,7 @@ export const configDescriptionToHtml = ( } const docPath = line.split(": ")[1]; const linkText = token.replaceAll("-", " "); - const link = `${linkText}`; + const link = `${linkText}`; result = result.replaceAll(tag, link); });