diff --git a/includes/common.inc b/includes/common.inc index 3b4bf58..4ac06e9 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -7423,6 +7423,10 @@ function drupal_explode_tags($tags) { } } + foreach($tags as &$tag) { + $tag = str_replace('[--SLASH--]', '/'); + } + return $tags; } diff --git a/misc/autocomplete.js b/misc/autocomplete.js index 8f7ac60..c959a71 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -293,7 +293,7 @@ Drupal.ACDB.prototype.search = function (searchString) { // encodeURIComponent to allow autocomplete search terms to contain slashes. $.ajax({ type: 'GET', - url: db.uri + '/' + Drupal.encodePath(searchString), + url: db.uri + '/' + Drupal.encodePath(searchString).replace('%2F', '[--SLASH--]'); dataType: 'json', success: function (matches) { if (typeof matches.status == 'undefined' || matches.status != 0) { diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 975ff12..b6b341f 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -119,13 +119,6 @@ function taxonomy_term_feed($term) { * @see taxonomy_field_widget_info() */ function taxonomy_autocomplete($field_name = '', $tags_typed = '') { - // If the request has a '/' in the search text, then the menu system will have - // split it into multiple arguments, recover the intended $tags_typed. - $args = func_get_args(); - // Shift off the $field_name argument. - array_shift($args); - $tags_typed = implode('/', $args); - // Make sure the field exists and is a taxonomy field. if (!($field = field_info_field($field_name)) || $field['type'] !== 'taxonomy_term_reference') { // Error string. The JavaScript handler will realize this is not JSON and