? 184524.patch
? filter_administration_2_.patch
? new_taxonomy_1.diff
? taxonomy-trim_1.patch
? taxonomy_get_synomyms_better.patch
? taxonomy_get_tree_indexed_by_tid.d7.patch
? taxonomy_page_increment.patch
? trim_term_vocab.patch
? up_terms_per_page.patch
? sites/default/files
? sites/default/settings.php
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.427
diff -u -p -r1.427 taxonomy.module
--- modules/taxonomy/taxonomy.module	19 Sep 2008 20:25:03 -0000	1.427
+++ modules/taxonomy/taxonomy.module	21 Sep 2008 22:54:44 -0000
@@ -211,6 +211,11 @@ function taxonomy_admin_vocabulary_title
 function taxonomy_save_vocabulary(&$edit) {
   $edit['nodes'] = empty($edit['nodes']) ? array() : $edit['nodes'];
 
+  if (!empty($edit['name'])) {
+  // Prevent leading and trailing spaces in vocabulary names.
+    $edit['name'] = trim($edit['name']);
+  }
+
   if (!isset($edit['module'])) {
     $edit['module'] = 'taxonomy';
   }
@@ -320,6 +325,11 @@ function taxonomy_save_term(&$form_value
     'weight' => 0
   );
 
+  if ($form_values['name']) {
+    // Prevent leading and trailing spaces in term names.
+    $form_values['name'] = trim($form_values['name']);
+  }
+
   if (!empty($form_values['tid']) && $form_values['name']) {
     drupal_write_record('term_data', $form_values, 'tid');
     $hook = 'update';
