@cloudcare/browser-core 1.2.7 → 1.2.9

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/cjs/dataMap.js CHANGED
@@ -143,10 +143,10 @@ var dataMap = {
143
143
  action: {
144
144
  type: _enums.RumEventType.ACTION,
145
145
  tags: {
146
- action_name: 'action.target.name',
147
146
  action_type: 'action.type'
148
147
  },
149
148
  fields: {
149
+ action_name: 'action.target.name',
150
150
  duration: 'action.loading_time',
151
151
  action_error_count: 'action.error.count',
152
152
  action_resource_count: 'action.resource.count',
@@ -2265,7 +2265,7 @@ function escapeJsonValue(value) {
2265
2265
  }
2266
2266
 
2267
2267
  function escapeFieldValueStr(str) {
2268
- return '"' + str.replace(/[\\]*"/g, '"').replace(/"/g, '\\"') + '"';
2268
+ return '"' + str.replace(/[\\]*"/g, '"').replace(/"/g, '\\"').replace(/\\/g, '\\\\') + '"';
2269
2269
  }
2270
2270
 
2271
2271
  function escapeRowField(value) {
package/esm/dataMap.js CHANGED
@@ -134,10 +134,10 @@ export var dataMap = {
134
134
  action: {
135
135
  type: RumEventType.ACTION,
136
136
  tags: {
137
- action_name: 'action.target.name',
138
137
  action_type: 'action.type'
139
138
  },
140
139
  fields: {
140
+ action_name: 'action.target.name',
141
141
  duration: 'action.loading_time',
142
142
  action_error_count: 'action.error.count',
143
143
  action_resource_count: 'action.resource.count',
@@ -1909,7 +1909,7 @@ export function escapeJsonValue(value) {
1909
1909
  }
1910
1910
  }
1911
1911
  export function escapeFieldValueStr(str) {
1912
- return '"' + str.replace(/[\\]*"/g, '"').replace(/"/g, '\\"') + '"';
1912
+ return '"' + str.replace(/[\\]*"/g, '"').replace(/"/g, '\\"').replace(/\\/g, '\\\\') + '"';
1913
1913
  }
1914
1914
  export function escapeRowField(value) {
1915
1915
  if (typeof value === 'object' && value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcare/browser-core",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "scripts": {
@@ -20,5 +20,5 @@
20
20
  "author": "dataflux",
21
21
  "license": "MIT",
22
22
  "description": "DataFlux RUM Web 端数据指标监控",
23
- "gitHead": "c3f30b3b86c7e305e49c336bab286e37d6f9de10"
23
+ "gitHead": "9a15e3d36ff76e9bd1830516743fb8299ce6829b"
24
24
  }
package/src/dataMap.js CHANGED
@@ -133,10 +133,10 @@ export var dataMap = {
133
133
  action: {
134
134
  type: RumEventType.ACTION,
135
135
  tags: {
136
- action_name: 'action.target.name',
137
136
  action_type: 'action.type'
138
137
  },
139
138
  fields: {
139
+ action_name: 'action.target.name',
140
140
  duration: 'action.loading_time',
141
141
  action_error_count: 'action.error.count',
142
142
  action_resource_count: 'action.resource.count',
@@ -1884,7 +1884,14 @@ export function escapeJsonValue(value) {
1884
1884
  }
1885
1885
  }
1886
1886
  export function escapeFieldValueStr(str) {
1887
- return '"' + str.replace(/[\\]*"/g, '"').replace(/"/g, '\\"') + '"'
1887
+ return (
1888
+ '"' +
1889
+ str
1890
+ .replace(/[\\]*"/g, '"')
1891
+ .replace(/"/g, '\\"')
1892
+ .replace(/\\/g, '\\\\') +
1893
+ '"'
1894
+ )
1888
1895
  }
1889
1896
  export function escapeRowField(value) {
1890
1897
  if (typeof value === 'object' && value) {