From cc4275339a21c8fb601c308ef677955dbbd5a1a3 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Thu, 23 May 2024 14:53:00 +0300 Subject: [PATCH] fix: encode queue name in links, closes #750 (#752) --- packages/ui/src/utils/links.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/utils/links.ts b/packages/ui/src/utils/links.ts index 7cbd0bb8..5fc9b972 100644 --- a/packages/ui/src/utils/links.ts +++ b/packages/ui/src/utils/links.ts @@ -5,7 +5,10 @@ export const links = { queueName: string, selectedStatuses: SelectedStatuses = {} ): { pathname: string; search: string } { - const { pathname, searchParams } = new URL(`/queue/${queueName}`, 'http://fake.com'); + const { pathname, searchParams } = new URL( + `/queue/${encodeURIComponent(queueName)}`, + 'http://fake.com' + ); const withStatus = selectedStatuses[queueName] && selectedStatuses[queueName] !== 'latest'; if (withStatus) {