summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Haug2010-12-08 21:08:25 +0000
committerNathan Haug2010-12-08 21:08:25 +0000
commit37c2bbc9e79944f79b21609de336bea87d58a06b (patch)
treee9fc1c6565ef6b82e3bd5789c92822bb2fa71f38
parente381a9b0cbbde4af7ab722c736492b4d8c22ea46 (diff)
#939102 by bleen and quicksketch: Accept attribute contains extensions instead of mimetypes (preventing Chrome from selecting files).
-rw-r--r--filefield.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/filefield.js b/filefield.js
index 63098fc..ec38122 100644
--- a/filefield.js
+++ b/filefield.js
@@ -54,7 +54,7 @@ Drupal.filefield = {
var fieldName = this.name.replace(/^files\[([a-z0-9_]+)_\d+\]$/, '$1');
var extensions = '';
if (Drupal.settings.filefield && Drupal.settings.filefield[fieldName]) {
- extensions = Drupal.settings.filefield[fieldName].replace(/,\s*/g, '|');
+ extensions = Drupal.settings.filefield[fieldName].replace(/[, ]+/g, '|');
}
if (extensions.length > 1 && this.value.length > 0) {
var extensionPattern = new RegExp('\\.(' + extensions + ')$', 'gi');