From 7db289218dcf2ecd39898199a92302e5e869bf32 Mon Sep 17 00:00:00 2001 From: James Norton Date: Mon, 10 Jul 2023 12:43:14 -0400 Subject: [PATCH] HACKFEST-23: Add url encoding for var params --- app/frontends/variable-coverages/get-variable-coverages.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/frontends/variable-coverages/get-variable-coverages.ts b/app/frontends/variable-coverages/get-variable-coverages.ts index 99b189047..e93b12606 100644 --- a/app/frontends/variable-coverages/get-variable-coverages.ts +++ b/app/frontends/variable-coverages/get-variable-coverages.ts @@ -72,7 +72,8 @@ export async function getVariableCoverages( // get the UMM variable data for the concept IDs const variableNames = (await getVariablesByIds(conceptIds, req.accessToken)).map((v) => v.umm.Name); - const varNameParam = variableNames.join(','); + const encodedVariableNames = variableNames.map((v) => encodeURIComponent(v)); + const varNameParam = encodedVariableNames.join(','); // get the associated collection ID for the variables (this assues they all are part of the same collection) const collectionConceptId = (await getCollectionsForVariable(conceptIds[0], req.accessToken))[0].id;