diff --git modules/taxonomy/taxonomy.test modules/taxonomy/taxonomy.test
index 0664c52..8385d09 100644
--- modules/taxonomy/taxonomy.test
+++ modules/taxonomy/taxonomy.test
@@ -601,6 +601,27 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
   }
 
   /**
+   * Test term autocompletion edge cases.
+   */
+  function testTermAutocompletion() {
+    $base = $this->randomName(2);
+    // Add a term with a slash in the name.
+    $term = $this->createTerm($this->vocabulary);
+    $term->name = $base . '/' . $this->randomName();
+    taxonomy_term_save($term);
+    // Add a term with a slash in the name.
+    $term = $this->createTerm($this->vocabulary);
+    $term->name = $base . '/' . $this->randomName();
+    taxonomy_term_save($term);
+
+    // Try to autocomplete the term name, that contains a slash.
+    // We should only get a single term returned.
+    $input = substr($term->name, 0, 5);
+    $this->drupalGet('taxonomy/autocomplete/taxonomy_' . $this->vocabulary->machine_name . '/' . $input);
+    $this->assertRaw(drupal_json_encode(array($term->name => check_plain($term->name))), t('Autocomplete returns term %term_name after typing the first 4 letters, including a slash in the name.', array('%term_name' => $term->name)));
+  }
+
+  /**
    * Save, edit and delete a term using the user interface.
    */
   function testTermInterface() {
