From 689a04a446132802fdaf8b3e50fe5de17c76e175 Mon Sep 17 00:00:00 2001 From: pamelin Date: Thu, 16 Feb 2023 17:05:20 +0000 Subject: [PATCH] fix: use encodeURIComponent in StackstormClient Signed-off-by: pamelin --- plugins/stackstorm/src/api/StackStormClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/stackstorm/src/api/StackStormClient.ts b/plugins/stackstorm/src/api/StackStormClient.ts index 1eb81c63e9..495384e8a5 100644 --- a/plugins/stackstorm/src/api/StackStormClient.ts +++ b/plugins/stackstorm/src/api/StackStormClient.ts @@ -75,7 +75,7 @@ export class StackstormClient implements StackstormApi { } async getExecution(id: string): Promise { - const path = `/executions/${id}`; + const path = `/executions/${encodeURIComponent(id)}`; return this.get(path); } @@ -93,10 +93,10 @@ export class StackstormClient implements StackstormApi { } getExecutionHistoryUrl(id: string): string { - return `${this.webUrl}/?#/history/${id}`; + return `${this.webUrl}/?#/history/${encodeURIComponent(id)}`; } getActionUrl(ref: string): string { - return `${this.webUrl}/?#/actions/${ref}`; + return `${this.webUrl}/?#/actions/${encodeURIComponent(ref)}`; } }