@internetstiftelsen/styleguide 2.22.3 → 2.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,12 +27,12 @@ var objToQuery = function objToQuery(obj) {
27
27
 
28
28
  if (Array.isArray(value)) {
29
29
  value.forEach(function (subValue) {
30
- return query.push(queryKey + '[]=' + subValue);
30
+ return query.push(queryKey + '[]=' + encodeURIComponent(subValue));
31
31
  });
32
32
  } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
33
33
  query.push(objToQuery(value, exclude, queryKey));
34
34
  } else {
35
- query.push(queryKey + '=' + value);
35
+ query.push(queryKey + '=' + encodeURIComponent(value));
36
36
  }
37
37
  });
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.22.3",
3
+ "version": "2.22.4",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -9,11 +9,11 @@ const objToQuery = (obj, exclude = [], parent = null) => {
9
9
  const queryKey = (parent) ? `${parent}[${key}]` : key;
10
10
 
11
11
  if (Array.isArray(value)) {
12
- value.forEach((subValue) => query.push(`${queryKey}[]=${subValue}`));
12
+ value.forEach((subValue) => query.push(`${queryKey}[]=${encodeURIComponent(subValue)}`));
13
13
  } else if (typeof value === 'object') {
14
14
  query.push(objToQuery(value, exclude, queryKey));
15
15
  } else {
16
- query.push(`${queryKey}=${value}`);
16
+ query.push(`${queryKey}=${encodeURIComponent(value)}`);
17
17
  }
18
18
  });
19
19
 
package/dist/.DS_Store DELETED
Binary file
package/src/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file