From ccce9a08b760d6a7947089d1c3d5fc13464c1765 Mon Sep 17 00:00:00 2001 From: Stefan Borchert Date: Sat, 4 Jun 2011 11:10:34 +0200 Subject: [PATCH] Issue #1000736: Taxonomy autocomplete and commas. --- modules/taxonomy/taxonomy.pages.inc | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 3aed290..8596b5c 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -110,7 +110,8 @@ function taxonomy_autocomplete($field_name, $tags_typed = '') { ->execute() ->fetchAllKeyed(); - $prefix = count($tags_typed) ? implode(', ', $tags_typed) . ', ' : ''; + $prefix = drupal_implode_tags($tags_typed); + $prefix .= count($tags_typed) ? ', ' : ''; $term_matches = array(); foreach ($tags_return as $tid => $name) { @@ -119,9 +120,8 @@ function taxonomy_autocomplete($field_name, $tags_typed = '') { if (strpos($name, ',') !== FALSE || strpos($name, '"') !== FALSE) { $n = '"' . str_replace('"', '""', $name) . '"'; } - else { - $term_matches[$prefix . $n] = check_plain($name); - } + // Add term name to list of matches. + $term_matches[$prefix . $n] = check_plain($name); } } -- 1.7.4