--- ../../drupal/includes/theme.inc	2006-07-13 15:11:36.000000000 +0200
+++ theme.inc	2006-08-02 19:07:56.000000000 +0200
@@ -533,6 +533,14 @@
 
   if (is_array($links)) {
     foreach ($links as $key => $link) {
+      if (!is_array($link['attributes'])) {         // no attributes array
+        foreach ($link as $key => $value) {
+          if ($key != 'title' && $key != 'href')  { // skip title and href
+            $link['attributes'][$key] = $value;     // build attributes array
+          }
+        }
+      }
+
       // Automatically add a class to each link and convert all _ to - for XHTML compliance
       if (isset($link['attributes']) && isset($link['attributes']['class'])) {
         $link['attributes']['class'] .= ' '. str_replace('_', '-', $key);
@@ -766,7 +774,12 @@
       $i = 0;
       foreach ($cells as $cell) {
         $cell = tablesort_cell($cell, $header, $ts, $i++);
-        $output .= _theme_table_cell($cell, 0);
+        $is_header = 0; // default cell not a th
+        if (isset($cell['header']) && $cell['header'] === TRUE) { // only boolean true will succeed
+          $is_header = 1;        	
+          unset($cell['header']);  // remove header to not end up in attributes
+        }
+        $output .= _theme_table_cell($cell, $is_header);
       }
       $output .= " </tr>\n";
     }
