Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.321
diff -u -F^f -r1.321 taxonomy.module
--- modules/taxonomy/taxonomy.module	22 Oct 2006 08:28:46 -0000	1.321
+++ modules/taxonomy/taxonomy.module	24 Oct 2006 18:56:57 -0000
@@ -144,7 +144,7 @@ function taxonomy_overview_vocabularies(
       $types[] = $node_type ? $node_type : $type;
     }
     $rows[] = array('name' => check_plain($vocabulary->name),
-      'type' => implode(', ', $types),
+      'type' => implode(' ', $types),
       'edit' => l(t('edit vocabulary'), "admin/content/taxonomy/edit/vocabulary/$vocabulary->vid"),
       'list' => l(t('list terms'), "admin/content/taxonomy/$vocabulary->vid"),
       'add' => l(t('add terms'), "admin/content/taxonomy/$vocabulary->vid/add/term")
@@ -633,21 +633,21 @@ function taxonomy_form_alter($form_id, &
           // Extract terms belonging to the vocabulary in question.
           if ($term->vid == $vocabulary->vid) {
 
-            // Commas and quotes in terms are special cases, so encode 'em.
-            if (preg_match('/,/', $term->name) || preg_match('/"/', $term->name)) {
-              $term->name = '"'.preg_replace('/"/', '""', $term->name).'"';
+            // Commas, spaces and quotes in terms are special cases, so encode 'em.
+            if (preg_match('/[", ]/', $term->name)) {
+              $term->name = '"'. preg_replace('/"/', '""', $term->name) .'"';
             }
 
             $typed_terms[] = $term->name;
           }
         }
-        $typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL);
+        $typed_string = implode(' ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL);
 
         if ($vocabulary->help) {
           $help = $vocabulary->help;
         }
         else {
-          $help = t('A comma-separated list of terms describing this content. Example: funny, bungee jumping, "Company, Inc.".');
+          $help = t('A space-separated list of terms describing this content. Use quotes for grouping words together. Example: funny "bungee jumping" "Company, Inc.".');
         }
         $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield',
           '#title' => $vocabulary->name,
@@ -749,7 +749,7 @@ function taxonomy_node_save($nid, $terms
     foreach ($typed_input as $vid => $vid_value) {
       // This regexp allows the following types of user input:
       // this, "somecmpany, llc", "and ""this"" w,o.rks", foo bar
-      $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
+      $regexp = '%(?:^|[, ]\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^" ,]*))%x';
       preg_match_all($regexp, $vid_value, $matches);
       $typed_terms = array_unique($matches[1]);
 
@@ -1407,7 +1407,7 @@ function taxonomy_autocomplete($vid, $st
   // The user enters a comma-separated list of tags. We only autocomplete the last tag.
   // This regexp allows the following types of user input:
   // this, "somecmpany, llc", "and ""this"" w,o.rks", foo bar
-  $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
+  $regexp = '%(?:^|[, ]\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^" ,]*))%x';
   preg_match_all($regexp, $string, $matches);
   $array = $matches[1];
 
@@ -1416,7 +1416,7 @@ function taxonomy_autocomplete($vid, $st
   if ($last_string != '') {
     $result = db_query_range(db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE t.vid = %d AND LOWER(t.name) LIKE LOWER('%%%s%%')", 't', 'tid'), $vid, $last_string, 0, 10);
 
-    $prefix = count($array) ? implode(', ', $array) .', ' : '';
+    $prefix = count($array) ? implode(' ', $array) .' ' : '';
 
     $matches = array();
     while ($tag = db_fetch_object($result)) {
