Autocomplete errors on whitespace only
jakeg - July 16, 2007 - 15:56
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | javascript |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Put a single space in an autocomplete field and you get "An HTTP error 403 occured".
I Presume we need some sort of JS equivalent of trim() on the text that gets sent to autocomplete.

#1
I get this error as well but i get it in D5.1
i created a text field that receives autocompletion in my custom form (fapi) and when i try to pass any number of whitespace characters into the field i get a 403 error. my custom autocomplete function is never called for the return values.
#2
the regular way is that bugfixes go in the current dev version, and then are backported
#3
I get none of this on today's HEAD.
#4
This error still exist, but I made a solution on my copy.
on misc/autocomplete.js file I added a condition to not allow space(s) only searchString.
if (this.input.value.replace(new RegExp("^[\\s]+", "g"), "")) {this.db.search(this.input.value);
}