diff U3 taxonomy_manager.admin.inc taxonomy_manager.admin-new.inc
--- taxonomy_manager.admin.inc	Sun Jan 31 10:47:27 2010
+++ taxonomy_manager.admin-new.inc	Thu Jun 09 14:53:48 2011
@@ -489,7 +489,10 @@
   $form = array();
   
   $description = "";
-  $description = t("If you have selected one or more terms in the tree view, the new terms are automatically children of those.");
+  $description = "<p>"
+               . t("If you have selected one or more terms in the tree view, the new terms are automatically children of those.")
+               . "</p>"
+               . t("You can add a description for each term by using the format name|description.  Description is optional.");
   
   $form['add'] = array( 
     '#type' => 'fieldset', 
@@ -514,7 +517,10 @@
   $form['add']['mass']['mass_add'] = array(
     '#type' => 'textarea',
     '#title' => t('Terms'),
-    '#description' => t('One term per line'),
+    '#description' => "<p>"
+                    . t('One term per line')
+                    . "</p>"
+                    . t("You can add a description for each term by using the format name|description.  Description is optional."),
     '#rows' => 10,
   );
   $form['add']['add'] = array( 
@@ -1168,23 +1174,43 @@
  */
 function taxonomy_manager_form_add_submit($form, &$form_state) {
   $terms = array();
+  $descriptions = array();
   $selected_tids = array();
   $selected_tids = $form_state['values']['taxonomy']['manager']['tree']['selected_terms'];
   foreach ($form_state['values']['add']['term'] as $value) {
     if (!empty($value)) {
-      $terms[] = $value;
+      if (strpos($value, '|') !== FALSE) {
+        list($terms[], $descriptions[]) = explode('|', $value);
+      }
+      else {
+        $terms[] = $value;
+        $descriptions[] = '';
+      }
     }
   }
   if ($form_state['values']['add']['mass']['mass_add']) {
-    foreach (explode ("\n", str_replace("\r", '', $form_state['values']['add']['mass']['mass_add'])) as $term) {
-      if ($term) {
-        $terms[] = $term;
+    $list = explode("\n", $form_state['values']['add']['mass']['mass_add']);
+    $list = array_map('trim', $list);
+    $list = array_filter($list, 'strlen');
+    foreach ($list as $opt) {
+      // Sanitize the user input with a permissive filter.
+      $opt = taxononmy_manager_content_filter_xss($opt);
+      if (strpos($opt, '|') !== FALSE) {
+        list($terms[], $descriptions[]) = explode('|', $opt);
+      }
+      else {
+        $terms[] = $opt;
+        $descriptions[] = '';
       }
     }
   }
+  
+  $i = 0;
+  
   foreach ($terms as $name) {
     $term = array();
     $term['name'] = $name;
+    $term['description'] = $descriptions[$i];
     $term['vid'] = $form_state['values']['vid'];
     $term['parent'] = $selected_tids;
     taxonomy_save_term($term);
@@ -1194,6 +1220,7 @@
         $updated_lang = TRUE;
       }
     }
+    $i++;
   }
   taxonomy_manager_update_voc($form_state['values']['vid'], $selected_tids);
   
@@ -1203,6 +1230,27 @@
   drupal_set_message(t("Terms added: %terms", array('%terms' => implode(', ', $terms))));
 }
 
+/**
+ * Like filter_xss_admin(), but with a shorter list of allowed tags.
+ *
+ * Used for items entered by administrators, like field descriptions,
+ * allowed values, where some (mainly inline) mark-up may be desired
+ * (so check_plain() is not acceptable).
+ *
+ * TAKEN FROM CCK's content.module ****
+ */
+function taxononmy_manager_content_filter_xss($string) {
+  return filter_xss($string, _taxononmy_manager_content_filter_xss_allowed_tags());
+}
+
+/**
+ * List of tags allowed by content_filter_xss().
+ *
+ * TAKEN FROM CCK's content.module ****
+ */
+function _taxononmy_manager_content_filter_xss_allowed_tags() {
+  return array('a', 'b', 'big',  'code', 'del', 'em', 'i', 'ins',  'pre', 'q', 'small', 'span', 'strong', 'sub', 'sup', 'tt', 'ol', 'ul', 'li', 'p', 'br', 'img');
+}
 
 /**
  * Validation handler for deleting terms
