Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit d9a7759

Browse files
author
Edgar Cruzado
authored
Encode uri components (#174)
* 1.9.0 * use encodeURIComponent for parameters
1 parent 138dd6c commit d9a7759

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": false,
55
"main": "./lib/src/Index.js",
66
"typings": "./lib/src/Index.d.ts",
7-
"version": "1.8.4",
7+
"version": "1.9.0",
88
"engines": {
99
"node": "> 6.0.0"
1010
},

src/VirtualDevice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ export class VirtualDevice {
208208
const parameterName = VirtualDeviceParameterMapper[key] || key;
209209
if (Array.isArray(parameterValue)) {
210210
for (const element of parameterValue) {
211-
path += "&" + parameterName + "=" + element;
211+
path += "&" + parameterName + "=" + encodeURIComponent(element);
212212
}
213213
} else {
214-
path += `&${parameterName}=${parameterValue}`;
214+
path += `&${parameterName}=${encodeURIComponent(parameterValue)}`;
215215
}
216216
}
217217

0 commit comments

Comments
 (0)