catalog: encode entity namespace and kind

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2023-09-18 23:37:31 +02:00
committed by Fredrik Adelöw
parent c0ed2394f5
commit 300466e1c1
@@ -71,7 +71,11 @@ export const EntityRefLink = forwardRef<any, EntityRefLinkProps>(
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 },