1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

fix: url encode application name in links (#2121)

* fix: url encode application name in links

This ensures that we url encode application names for our links.
This commit is contained in:
Gard Rimestad 2022-09-30 15:53:02 +02:00 committed by GitHub
parent 5141e77bce
commit ba8bdc585a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,9 @@ export const AppsLinkList = ({ apps }) => (
<ListItemText
primary={
<Link
to={`/applications/${appName}`}
to={`/applications/${encodeURIComponent(
appName
)}`}
className={[
styles.listLink,
styles.truncate,

View File

@ -28,7 +28,7 @@ const useApplicationsApi = () => {
};
const deleteApplication = async (appName: string) => {
const path = `${URI}/${appName}`;
const path = `${URI}/${encodeURIComponent(appName)}`;
const req = createRequest(path, { method: 'DELETE' });
try {