53ce7b3115db3cef733935b36215b1e7a1333b0f
larrym
  Thu Aug 2 19:45:57 2012 -0700
encodeURIComponent key in case it has punctuation in it (e.g. "RH18061;RH80175")
diff --git src/hg/js/autocomplete.js src/hg/js/autocomplete.js
index 8121a45..e458681 100644
--- src/hg/js/autocomplete.js
+++ src/hg/js/autocomplete.js
@@ -5,31 +5,31 @@
 
 /* suggest (aka gene search)
    Requires three elements on page: positionDisplay (static display), positionInput (input textbox) and position (hidden).
 */
 
 var suggestBox = {
     ajaxGet: function ajaxGet(db) {
         // Returns autocomplete source function
         // db is the relevant assembly (e.g. "hg18")
         var cache = new Object;   // cache is is used as a hash to cache responses from the server.
         return function (request, callback) {
             var key = request.term;
             if(cache[key] == null) {
                 $.ajax({
                            url: "../cgi-bin/hgSuggest",
-                           data: "db=" + db + "&prefix=" + key,
+                           data: "db=" + db + "&prefix=" + encodeURIComponent(key),
                            // dataType: "json",  // XXXX this doesn't work under IE, so we retrieve as text and do an eval to force to an object.
                            trueSuccess: function (response, status) {
                                // We get a lot of duplicate requests (especially the first letters of words),
                                // so we keep a cache of the suggestions lists we've retreived.
                                cache[this.key] = response;
                                this.cont(eval(response));
                            },
                            success: catchErrorOrDispatch,
                            error: function (request, status, errorThrown) {
                                if (typeof console != "undefined") {
                                    console.dir(request);
                                    console.log(status);
                                }
                                var msg = "ajax call failed";
                                if(status != "error")