Index: audio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.module,v
retrieving revision 1.150
diff -u -p -r1.150 audio.module
--- audio.module	13 Oct 2008 18:36:23 -0000	1.150
+++ audio.module	26 Nov 2008 01:16:26 -0000
@@ -727,7 +727,7 @@ function audio_form(&$node, &$form_state
     '#tree' => FALSE,
     '#type' => 'file',
     '#title' => empty($node->audio['file']->filename) ? t('Add a new audio file') : t('Replace this with a new file'),
-    '#attributes' => array('accept' => $extensions),
+    '#attributes' => array('audio_accept' => $extensions),
     '#description' => t('Click "Browse..." to select an audio file to upload. Only files with the following extensions are allowed: %allowed-extensions.', array('%allowed-extensions' => $extensions)) .'<br />'
       . t('<strong>NOTE:</strong> the current PHP configuration limits uploads to %maxsize.', array('%maxsize' => format_size(file_upload_max_size()))),
   );
Index: audio.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.js,v
retrieving revision 1.1
diff -u -p -r1.1 audio.js
--- audio.js	13 Oct 2008 17:38:55 -0000	1.1
+++ audio.js	26 Nov 2008 01:16:26 -0000
@@ -4,25 +4,23 @@
  * Auto-attach standard client side file input validation.
  */
 Drupal.behaviors.audioValidateAutoAttach = function(context) {
-  $("input[@type='file'][accept]", context).change( function() {
+  $("input[@type='file'][audio_accept]", context).change( function() {
     $('.audio-js-error').remove();
 
     /**
      * Add client side validation for extensions.
      */
-    if (this.accept.length > 1) {
-      piped = this.accept.replace(/, /g, '|');
-      if (piped) {
-        v = new RegExp('\\.(' + piped + ')$', 'gi');
-        if (!v.test(this.value)) {
-          var error = Drupal.t("The selected file %filename cannot not be uploaded. Only files with the following extensions are allowed: %extensions.",
-            { '%filename' : this.value, '%extensions': this.accept }
-          );
-          // What do I prepend this to?
-          $(this).before('<div class="messages error audio-js-error">' + error + '</div>');
-          this.value = '';
-          return false;
-        }
+    var accept = $(this).attr('audio_accept');
+    if (accept.length > 1) {
+      v = new RegExp('\\.(' + accept.replace(/,\s*/g, '|') + ')$', 'gi');
+      if (!v.test(this.value)) {
+        var error = Drupal.t("The selected file %filename cannot not be uploaded. Only files with the following extensions are allowed: %extensions.",
+          { '%filename' : this.value, '%extensions': accept }
+        );
+        // What do I prepend this to?
+        $(this).before('<div class="messages error audio-js-error">' + error + '</div>');
+        this.value = '';
+        return false;
       }
     }
   });
Index: images/audio_images.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/images/audio_images.module,v
retrieving revision 1.8
diff -u -p -r1.8 audio_images.module
--- images/audio_images.module	31 Oct 2008 16:46:24 -0000	1.8
+++ images/audio_images.module	26 Nov 2008 01:16:27 -0000
@@ -106,7 +106,7 @@ function audio_images_form_alter(&$form,
       '#type' => 'file',
       '#title' => t('Add a new image'),
       '#tree' => FALSE,
-      '#attributes' => array('accept' => 'gif, jpg, jpeg, png'),
+      '#attributes' => array('audio_accept' => 'gif, jpg, jpeg, png'),
       '#description' => t('Click "Browse..." to select an image to add to this audio file. <strong>NOTE:</strong> Supported image types include GIF, JPG, and PNG.  Suggested dimensions: 170 X 170 pixels.'),
     );
   }
