#215 Incorrect search if string contains spaces

current_cvs
closed-fixed
Andre-Littoz
Browsing (93)
3
2012-08-03
2012-07-30
Andre-Littoz
No

Free text search (script search)

If the submitted string contains spaces, HTML <FORM> submission algorithm transforms spaces into plus signs (+) gefore inserting it into the query part of the URL.

Presently, search uses this string (argument _string) "as is". If, unfortunately, the string contains spaces, it is passed to glimpse with the pluses. The search will frequently results in a failure or at best in incorrect hits.

Fix: add

$searchtext =~ s/\+/ /g;

before launching the searh in sub search.

Discussion

  • Andre-Littoz
    Andre-Littoz
    2012-08-03

    Fixed as suggested

     
  • Andre-Littoz
    Andre-Littoz
    2012-08-03

    • status: open --> closed-fixed