From 08b1bb73f770888b39ac862495622629af65de97 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 28 Jun 2009 13:37:29 +0000 Subject: - Patch #201269 by Xano; synonym collapsing in core. --- misc/autocomplete.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc') diff --git a/misc/autocomplete.js b/misc/autocomplete.js index aed6628b3..706a0cf2f 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -255,6 +255,12 @@ Drupal.ACDB.prototype.search = function (searchString) { var db = this; this.searchString = searchString; + // See if this string needs to be searched for anyway. + searchString = searchString.replace(/^\s+|\s+$/, ''); + if (searchString.charAt(searchString.length - 1) == ',') { + return; + } + // See if this key has been searched for before. if (this.cache[searchString]) { return this.owner.found(this.cache[searchString]); -- cgit v1.2.3