ソースを参照

Fix #43: Validate special characters in filename before rendering caption

Kartik Visweswaran 10 年 前
コミット
ec7d88eedb
2 ファイル変更1 行追加1 行削除
  1. 1 1
      js/fileinput.js
  2. 0 0
      js/fileinput.min.js

+ 1 - 1
js/fileinput.js

@@ -624,7 +624,7 @@
             readFile(0);
         },
         slug: function (text) {
-            return isEmpty(text) ? '' : text.replace(/[^\w-. ]+/g,'');
+            return isEmpty(text) ? '' : text.split(/(\\|\/)/g).pop().replace(/[^\w-.\\\/ ]+/g,'');
         },
         change: function (e) {
             var self = this, $el = self.$element, label = self.slug($el.val()),

ファイルの差分が大きいため隠しています
+ 0 - 0
js/fileinput.min.js


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません