fix(ui): URL encode urns for ownership entity links (#6814)

This commit is contained in:
Aditya Radhakrishnan 2022-12-20 07:04:56 -08:00 committed by GitHub
parent 5584bfb469
commit cd937e0c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import { useEntityRegistry } from '../../../../useEntityRegistry';
import analytics, { EventType, EntityActionType } from '../../../../analytics';
import { useEntityData } from '../../EntityContext';
import { getDescriptionFromType, getNameFromType } from '../../containers/profile/sidebar/Ownership/ownershipUtils';
import { urlEncodeUrn } from '../../utils';
type Props = {
entityUrn?: string;
@ -88,7 +89,7 @@ export const ExpandedOwner = ({ entityUrn, owner, hidePopOver, refetch }: Props)
return (
<OwnerTag onClose={onClose} closable={!!entityUrn}>
<Link to={`/${entityRegistry.getPathName(owner.owner.type)}/${owner.owner.urn}`}>
<Link to={`/${entityRegistry.getPathName(owner.owner.type)}/${urlEncodeUrn(owner.owner.urn)}`}>
<CustomAvatar name={name} photoUrl={pictureLink} useDefaultAvatar={false} />
{(hidePopOver && <>{name}</>) || (
<Popover