? form.patch
? includes/form.patch
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.324
--- includes/form.inc	2009-07-27 14:32:53.000000000 -0300
+++ includes/form.inc	2009-09-08 10:24:57.000000000 -0300
@@ -1437,7 +1437,10 @@
       else {
         $selected = '';
       }
-      $options .= '<option value="'. check_plain($key) .'"'. $selected .'>'. check_plain($choice) .'</option>';
+
+      if (is_array($element['#options_attributes']))
+        $options_attributes = ' ' .drupal_attributes($element['#options_attributes'][$key]);
+      $options .= '<option value="'. check_plain($key) .'"'. $selected .$options_attributes .'>'. check_plain($choice).'</option>';
     }
   }
   return $options;
