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
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

litwol - July 16, 2007 - 22:38
Version:6.x-dev» 5.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

yched - July 16, 2007 - 22:47
Version:5.1» 6.x-dev

the regular way is that bugfixes go in the current dev version, and then are backported

#3

chx - September 2, 2007 - 05:31
Status:active» won't fix

I get none of this on today's HEAD.

#4

mello.capinpin - August 19, 2008 - 06:15

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);
}

 
 

Drupal is a registered trademark of Dries Buytaert.