Search block does not work in IE7 with Active Search enabled

yngens - October 4, 2007 - 03:04
Project:Javascript Tools
Version:5.x-1.x-dev
Component:Active Search
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

It works perfectly well in FF, but in IE7 (did not test in IE6 or earlier versions) it automatically prefixes number '20' to searched term, which of course gives no any search result. I noticed that in address bar of FF after you submit term via search block it shows:

http://www.example.com/search/node#keys%20klk, which works correctly. But in IE7 address bar shows:

http://www.example.com/search/node#keys%2020klk

Extra '20' is wrongfully being generated.

#1

9802008 - November 24, 2007 - 16:46

I am experiencing the same problem in IE 6. An extra 20 or a %20 is prefixed to the search term. Also the search results are reloaded twice - first time nothing is found, second time search results are found.

#2

nedjo - November 24, 2007 - 23:54

I at least attempted to fix this previously; the fix at that time seemed to work. Can you confirm that you are using the 5.x dev version?

#3

yngens - November 28, 2007 - 20:16

I confirm I am using dev version.

#4

davexoxide - September 2, 2008 - 15:12

When using the default search block provided by drupal core, I do not get an extra 20, but I am getting no results found when %20 is present.
If I use the search box provided by Active Search the %20 doesn't appear at all and the search works fine.

#5

ekendra - October 7, 2008 - 22:46

in activesearch.js change the function starting on line 29 to:

Drupal.activesearchSubmit = function() {
  var nastyChars = eval("/%20|#/ig");
  $('#edit-keys').attr('value', location.hash.substring(6).replace(nastyChars, ' '));
  // Call the submit event.
  $('#search-form').submit();
  // Actually submit the form.
  $('#search-form')[0].submit();
};

seems to do the trick although I'm sure there's a more elegant solution

#6

ekendra - October 8, 2008 - 00:59

in activesearch.js change the function starting on line 29 to:

Drupal.activesearchSubmit = function() {
  var nastyChars = eval("/%20|#/ig");
  $('#edit-keys').attr('value', location.hash.substring(6).replace(nastyChars, ' '));
  // Call the submit event.
  $('#search-form').submit();
  // Actually submit the form.
  $('#search-form')[0].submit();
};

seems to do the trick although I'm sure there's a more elegant solution

 
 

Drupal is a registered trademark of Dries Buytaert.