From 4bcee572f1692679e90b53e19aedc5d1feeb1a16 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Mon, 16 Sep 2019 14:17:27 -0700 Subject: [PATCH] Fix URL-encoding of download params hyperlink --- ui/components/all-parameters.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/components/all-parameters.ts b/ui/components/all-parameters.ts index 0c344d8..cb006c3 100644 --- a/ui/components/all-parameters.ts +++ b/ui/components/all-parameters.ts @@ -140,7 +140,9 @@ const component: ClosureComponent = (): Component => { m( "a.download-csv", { - href: `/api/devices/${device["DeviceID.ID"].value[0]}.csv`, + href: `/api/devices/${encodeURIComponent( + device["DeviceID.ID"].value[0] + )}.csv`, download: "", style: "float: right;" },