backend-manager 3.2.98 → 3.2.99

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": "backend-manager",
3
- "version": "3.2.98",
3
+ "version": "3.2.99",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -195,10 +195,11 @@ Analytics.prototype.event = function (payload) {
195
195
  // https://support.google.com/analytics/answer/13316687?hl=en#zippy=%2Cweb
196
196
  // https://support.google.com/analytics/answer/9268042?sjid=4476481583372132143-NC
197
197
  // https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#screen_view
198
+
198
199
  payload = payload || {};
199
200
  payload.name = (payload.name || '')
200
- // Replace slashes and spaces with underscores
201
- .replace(/\/| /g, '_')
201
+ // Replace anything not a letter, number, or underscore with an underscore
202
+ .replace(/[^a-zA-Z0-9_]/g, '_')
202
203
  // Remove leading and trailing underscores
203
204
  .replace(/^_+|_+$/g, '')
204
205
  // Remove multiple underscores