Skip to content

Commit d454133

Browse files
authored
Fixed a couple places where we were not URI encoding groupId and artifactId in nav links; (#5470)
1 parent 907761b commit d454133

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ui/ui-app/src/app/pages/artifact/ArtifactPage.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ export const ArtifactPage: FunctionComponent<PageProperties> = () => {
9797
};
9898

9999
const handleTabClick = (_event: any, tabIndex: any): void => {
100+
const gid: string = encodeURIComponent(groupId as string);
101+
const aid: string = encodeURIComponent(artifactId as string);
102+
100103
if (tabIndex === "overview") {
101-
appNavigation.navigateTo(`/explore/${groupId}/${artifactId}`);
104+
appNavigation.navigateTo(`/explore/${gid}/${aid}`);
102105
} else {
103-
appNavigation.navigateTo(`/explore/${groupId}/${artifactId}/${tabIndex}`);
106+
appNavigation.navigateTo(`/explore/${gid}/${aid}/${tabIndex}`);
104107
}
105108
};
106109

ui/ui-app/src/app/pages/group/GroupPage.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ export const GroupPage: FunctionComponent<PageProperties> = () => {
8383
};
8484

8585
const handleTabClick = (_event: any, tabIndex: any): void => {
86+
const gid: string = encodeURIComponent(groupId as string);
87+
8688
if (tabIndex === "overview") {
87-
appNavigation.navigateTo(`/explore/${groupId}`);
89+
appNavigation.navigateTo(`/explore/${gid}`);
8890
} else {
89-
appNavigation.navigateTo(`/explore/${groupId}/${tabIndex}`);
91+
appNavigation.navigateTo(`/explore/${gid}/${tabIndex}`);
9092
}
9193
};
9294

0 commit comments

Comments
 (0)