yelda-webchat 1.1.18 → 1.1.19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yelda-webchat",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "description": "Website Chat Plugin",
5
5
  "main": "./dist/js/yeldaWebchatInjector.min.js",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "autoprefixer-loader": "^3.2.0",
28
28
  "aws-sdk": "^2.732.0",
29
29
  "babel-core": "^6.26.3",
30
- "babel-eslint": "^8.2.6",
30
+ "babel-eslint": "^10.1.0",
31
31
  "babel-loader": "^7.1.5",
32
32
  "babel-plugin-transform-runtime": "^6.23.0",
33
33
  "babel-preset-env": "^1.7.0",
@@ -44,7 +44,7 @@
44
44
  "extract-text-webpack-plugin": "^3.0.2",
45
45
  "file-loader": "^1.1.11",
46
46
  "inject-loader": "^4.0.1",
47
- "jsdom": "^13.2.0",
47
+ "jsdom": "^16.5.0",
48
48
  "less": "^3.10.3",
49
49
  "less-loader": "^4.1.0",
50
50
  "mime": "^2.4.6",
@@ -14,17 +14,15 @@ import config from '../config'
14
14
  * @returns {Boolean}
15
15
  */
16
16
  const isStrLikelyEncoded = (str) => {
17
- // Check if the string contains any characters that would typically need encoding
18
- const needsEncoding = /[?&=<>#%{}|\\\^~\[\]`;"\s]/.test(str)
19
-
20
17
  // Check if the string contains any non-ASCII characters
18
+ // eslint-disable-next-line no-control-regex
21
19
  const hasNonASCII = /[^\x00-\x7F]/.test(str);
22
20
 
23
21
  // Check if the string contains any percent-encoded characters
24
22
  const hasPercentEncoding = /%[0-9A-Fa-f]{2}/.test(str)
25
23
 
26
24
  // Return true if any of the conditions are met
27
- return needsEncoding || hasNonASCII || hasPercentEncoding
25
+ return hasNonASCII || hasPercentEncoding
28
26
  }
29
27
 
30
28
  /**
@@ -115,7 +113,6 @@ class YeldaChat {
115
113
  }
116
114
  return arg.replace(/^['"]|['"]$/g, '') // Remove surrounding quotes if any
117
115
  })
118
-
119
116
  return { functionName, args }
120
117
  }
121
118