From 300466e1c1a202645e196968ad70f8268360ee4c Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 18 Sep 2023 23:37:31 +0200 Subject: [PATCH] catalog: encode entity namespace and kind Signed-off-by: Vincenzo Scamporlino --- .../src/components/EntityRefLink/EntityRefLink.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx index 82a98ca417..d682abdc2b 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx @@ -71,7 +71,11 @@ export const EntityRefLink = forwardRef( kind = kind.toLocaleLowerCase('en-US'); namespace = namespace?.toLocaleLowerCase('en-US') ?? DEFAULT_NAMESPACE; - const routeParams = { kind, namespace, name: encodeURIComponent(name) }; + const routeParams = { + kind: encodeURIComponent(kind), + namespace: encodeURIComponent(namespace), + name: encodeURIComponent(name), + }; const formattedEntityRefTitle = humanizeEntityRef( { kind, namespace, name }, { defaultKind },