Explorar el Código

Fix #1617: Better encoded file id generation

Kartik Visweswaran hace 4 años
padre
commit
5c94ab0dc8
Se han modificado 3 ficheros con 2 adiciones y 1 borrados
  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**: _under development_
 **Date**: _under development_
 
 
+- (enh #1617): Better encoded file id generation.
 - (enh #1612, #1614): Remove unsupported script-inline from template and CSP buffer.
 - (enh #1612, #1614): Remove unsupported script-inline from template and CSP buffer.
 
 
 ## version 5.1.2
 ## version 5.1.2

+ 1 - 1
js/fileinput.js

@@ -111,7 +111,7 @@
             if (!relativePath) {
             if (!relativePath) {
                 return null;
                 return null;
             }
             }
-            return (file.size + '_' + relativePath.replace(/\s/img, '_'));
+            return (file.size + '_' + encodeURIComponent(relativePath).replace(/%/g, '_'));
         },
         },
         getFrameSelector: function (id, selector) {
         getFrameSelector: function (id, selector) {
             selector = selector || '';
             selector = selector || '';

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
js/fileinput.min.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio