web-manager 3.2.61 → 3.2.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/utilities.js +21 -8
  2. package/package.json +2 -2
package/lib/utilities.js CHANGED
@@ -110,14 +110,27 @@ Utilities.escapeHTML = function (str) {
110
110
  shadow.innerHTML = '';
111
111
  shadow.appendChild(document.createTextNode(str));
112
112
 
113
- return shadow.innerHTML.replace(/["']/g, function(m) {
114
- switch (m) {
115
- case '"':
116
- return '"';
117
- default:
118
- return ''';
119
- }
120
- });
113
+ return shadow.innerHTML
114
+ .replaceAll('&', '&')
115
+ .replaceAll('<', '&lt;')
116
+ .replaceAll('>', '&gt;')
117
+ .replaceAll('"', '&quot;')
118
+ .replaceAll('\'', '&#039;');
119
+
120
+ // return shadow.innerHTML.replace(/[&<>"']/g, function (m) {
121
+ // switch (m) {
122
+ // case '&':
123
+ // return '&amp;';
124
+ // case '<':
125
+ // return '&lt;';
126
+ // case '>':
127
+ // return '&gt;';
128
+ // case '"':
129
+ // return '&quot;';
130
+ // case "'":
131
+ // return '&#039;';
132
+ // }
133
+ // });
121
134
  }
122
135
 
123
136
  Utilities.getContext = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.61",
3
+ "version": "3.2.63",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,7 +40,7 @@
40
40
  "replace": {}
41
41
  },
42
42
  "dependencies": {
43
- "@sentry/browser": "^8.17.0",
43
+ "@sentry/browser": "^8.34.0",
44
44
  "cookieconsent": "^3.1.1",
45
45
  "firebase": "^9.23.0",
46
46
  "itwcw-package-analytics": "^1.0.6",