Browse Source

Fix #1113: Correct default slugCallback

Kartik Visweswaran 7 years ago
parent
commit
f7a3e44354
3 changed files with 2 additions and 1 deletions
  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