Skip to main content

Bug Tracker

Side navigation

#2970 closed bug (invalid)

Opened June 02, 2008 06:56PM UTC

Closed October 03, 2010 12:52AM UTC

[autocomplete] Searching for "#" translates into a blank string

Reported by: joelz Owned by: stefan
Priority: major Milestone: 1.3
Component: interface Version: 1.2.5
Keywords: autocomplete Cc:
Blocked by: Blocking:
Description

When you do a search for anything involving the '#' character and extra params, the browser forms the url like http://[searchUrl]?q=#state=1, which means that the browser will think anything after the "#" is part of the hash, and it won't look it up correctly. It also things that the search is for an empty string.

All you have to do to fix it is move the "q" param to the end of the url, here's the fix for makeUrl:

function makeUrl(q) {
    var url = options.url + "?";
    for (var i in options.extraParams) {
        url += i + "=" + encodeURI(options.extraParams[i]) + "&";
    }
       
    url += "q=" + encodeURI(q);
    return url;
};
Attachments (0)
Change History (1)

Changed October 03, 2010 12:52AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

Not a jQuery core bug.