? cat_term_links.patch
Index: /Applications/MAMP/htdocs/freetags/drupal/sites/all/modules/comment_alter_taxonomy/comment_alter_taxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_alter_taxonomy/comment_alter_taxonomy.module,v
retrieving revision 1.2
diff -u -p -r1.2 comment_alter_taxonomy.module
--- comment_alter_taxonomy.module	8 Mar 2008 23:56:48 -0000	1.2
+++ comment_alter_taxonomy.module	9 Mar 2008 00:12:58 -0000
@@ -510,12 +510,11 @@ function comment_alter_taxonomy_project_
               $vocabulary = $allowed[$vid];
               $metadata["taxonomy_vid_$vid"] = array('label' => check_plain(t("$vocabulary->name")));
             }
-            $grouped_terms[$vid][] = $term->name;
+            $grouped_terms[$vid][] = theme('comment_alter_taxonomy_project_issue_metadata_term', $term);
           }
         }
         foreach ($grouped_terms as $vid => $terms) {
-          // TODO:  Make this a link to the term itself.
-          $metadata["taxonomy_vid_$vid"]['current'] = check_plain(implode(', ', $terms));
+          $metadata["taxonomy_vid_$vid"]['current'] = implode(', ', $terms);
         }
         break;
       }
@@ -619,13 +618,13 @@ function comment_alter_taxonomy_project_
           // Add this term change to the $metadata array.
           if (is_array($metadata["taxonomy_vid_$vid"][$old_new])) {
             // Multiple select vocabulary.
-            $metadata["taxonomy_vid_$vid"][$old_new][$tid] = $term['name'];
+            $metadata["taxonomy_vid_$vid"][$old_new][$tid] = theme('comment_alter_taxonomy_project_issue_metadata_term', (object) $term);
           }
           elseif (!empty($metadata["taxonomy_vid_$vid"][$old_new])) {
-            $metadata["taxonomy_vid_$vid"][$old_new] .= ', '. $term['name'];
+            $metadata["taxonomy_vid_$vid"][$old_new] .= ', '. theme('comment_alter_taxonomy_project_issue_metadata_term', (object) $term);
           }
           else {
-            $metadata["taxonomy_vid_$vid"][$old_new] = $term['name'];
+            $metadata["taxonomy_vid_$vid"][$old_new] = theme('comment_alter_taxonomy_project_issue_metadata_term', (object) $term);
           }
         }
       }
@@ -641,6 +640,20 @@ function comment_alter_taxonomy_project_
       break;
   }
 }
+/**
+ * Theme a taxonomy term in a project issue metadata table.
+ *
+ * NOTE:  Because the l() function sanitizes the title, any function
+ * that overrides this function must make sure to do the same.
+ *
+ * @param $term
+ *  The taxonomy term object.
+ * @return
+ *  The themed term.
+ */
+function theme_comment_alter_taxonomy_project_issue_metadata_term($term) {
+  return l($term->name, taxonomy_term_path($term));
+}
 
 /**
  * Take an array of taxonomy terms built from the comment that
