ls-pro-common 3.1.59 → 3.1.60

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.
@@ -39,7 +39,8 @@ var ViewDocment = function ViewDocment(props) {
39
39
  href = href + (href.includes('?') ? '&' : '?') + 'token=' + token;
40
40
  }
41
41
  if (!href.includes('fullfilename=')) {
42
- filename = filename.replace(/\//g, '');
42
+ //filename只保留中文,英文和数字
43
+ filename = filename.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g, '');
43
44
  href = href + (href.includes('?') ? '&' : '?') + 'fullfilename=' + filename;
44
45
  }
45
46
  var doc = base64Encode(href);
@@ -39,7 +39,8 @@ var ViewDocment = function ViewDocment(props) {
39
39
  href = href + (href.includes('?') ? '&' : '?') + 'token=' + token;
40
40
  }
41
41
  if (!href.includes('fullfilename=')) {
42
- filename = filename.replace(/\//g, '');
42
+ //filename只保留中文,英文和数字
43
+ filename = filename.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g, '');
43
44
  href = href + (href.includes('?') ? '&' : '?') + 'fullfilename=' + filename;
44
45
  }
45
46
  var doc = base64Encode(href);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "3.1.59",
3
+ "version": "3.1.60",
4
4
  "description": "ls-pro-common",
5
5
  "license": "MIT",
6
6
  "sideEffects": [