瀏覽代碼

Fix #1113: Correct default slugCallback

Kartik Visweswaran 7 年之前
父節點
當前提交
f7a3e44354
共有 3 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CHANGE.md
  2. 1 1
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -5,6 +5,7 @@ Change Log: `bootstrap-fileinput`
 
 **Date:** Work in progress
 
+- (enh #1113): Correct slug default callback to include hyphens in file name.
 - (enh #1111): Enhance default file download action to use `button` markup.
 - (enh #1110): Add support for previewing TIFF, EPS, AI, WMF files.
 - (bug #1108): Correct sortable drag element parsing during sorting.

+ 1 - 1
js/fileinput.js

@@ -2822,7 +2822,7 @@
             }
         },
         _slugDefault: function (text) {
-            return $h.isEmpty(text) ? '' : String(text).replace(/[\-\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, '_');
+            return $h.isEmpty(text) ? '' : String(text).replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, '_');
         },
         _readFiles: function (files) {
             this.reader = new FileReader();

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


Some files were not shown because too many files changed in this diff