Spaces in search parameters
Kohaites, It's my bug so here's my solution: I have edited search.pl to read like this: ($keyword) && (push @$forminputs, { line => "keyword=$keyword", name => "keyword", value => "$keyword"} And it goes. Each parameter in the form has a name and value, instead of being lumped together in one string. Now, the search results template is modified to look something like this but without whitespace: <a href=search.pl?startfrom=<TMPL_VAR NAME="prevstartfrom">&<TMPL_LOOP NAME=FORMINPUTS> <TMPL_VAR NAME=name>=<TMPL_VAR NAME=value ESCAPE=URL> <!-- new --> &</TMPL_LOOP>type=<TMPL_IF NAME="opac">opac<TMPL_ELSE>intra</TMPL_IF>>Previous Records</a> And the nice HTML::Template module URL-escapes the value of the variable. At first I tried just URLescaping the whole thing (line) but that turns the equals sign into a percent-code. I have not yet succeeded in replacing all the necessary pieces of search-results.tmpl but I can now browse my whole collection by searching for a ' ' (space). - Daniel Holth
On Tue, Aug 27, 2002 at 10:04:42PM -0400, Daniel Holth said:
Kohaites,
It's my bug so here's my solution:
Hi Daniel That looks to be a nice elegant solution. For HLT tho, we'd have to disable the search by space (browse option). Since it will cause a huge search, this made me think, we might need to add some parameters to the system preferences table to control how searches work? What do people think? Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (2)
-
Chris Cormack -
Daniel Holth