From 8e17765e3f91d27b4689045d7682da1c5cc1499c Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Thu, 4 Feb 2021 07:51:46 +0000 Subject: [PATCH] Fixes url escaping (#24) --- index.json | 2 +- scripts/add.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index e182e37..5db4f01 100644 --- a/index.json +++ b/index.json @@ -748,7 +748,7 @@ "manufacturerCode": 4687, "imageType": 0, "modelId": "GL-S-007P", - "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota", + "url": "https://github.com/Koenkk/zigbee-OTA/raw/master/images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%25.ota", "path": "images/Gledopto/GL-S-007P_V15_A1_OTAV5_20210201_90%.ota" } ] \ No newline at end of file diff --git a/scripts/add.js b/scripts/add.js index a16e777..ade698a 100644 --- a/scripts/add.js +++ b/scripts/add.js @@ -80,7 +80,7 @@ const main = async () => { entry.url = filenameOrURL; } else { const destinationPosix = destination.replace(/\\/g, '/'); - entry.url = `${baseURL}/${destinationPosix}`; + entry.url = `${baseURL}/${escape(destinationPosix)}`; entry.path = destinationPosix; }