@cloudcare/browser-core 1.2.8 → 1.2.11

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.
@@ -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) {
@@ -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.8",
3
+ "version": "1.2.11",
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": "7a00f6c0d6380acd59c36f5f0e0b0d46f0d0630a"
23
+ "gitHead": "7a7a643e72002ffafff9ce0f6c1b1c2f904eeebe"
24
24
  }
@@ -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) {