[ic] Problem re-using search data containing spaces

Steve interchange at bojanglesdesign.co.uk
Mon Oct 11 09:20:18 EDT 2004


Hello,

I have a one-click search on my product page to allow users to easily search
for more products by the same publisher:

    Search: [page search="
                sf=publisher
                se=[item-field publisher]
                ml=20
                tf=title
                su=1
            "][item-field publisher][/page]

After this search is issued, there is a drop-down form box on the results
page where users can chose to re-sort the data by another field.

    <form action="/cgi-bin/bookshop/search.html?id=..." method="GET">
    <input type=hidden name=mv_session_id value="...">
    <INPUT TYPE=hidden NAME=mv_searchtype VALUE=db>
    <INPUT TYPE=hidden NAME=mv_matchlimit VALUE=20>
    <input type=hidden name=mv_substring_match value=1>
    <input type="hidden" name="mv_search_field" value="publisher">
    <input type="hidden" name="mv_searchspec" value="Penguin%20Books">

    <select name="mv_sort_field" size="1">
       <option value="title">title</option>
        <option value="author" selected>author</option>
        <option value="publisher">publisher</option>
        <option value="category">category</option>
    </select>

    <input type="submit" name="submit" value="Go">
    </form>

However, if the 'publisher' name contains a space, the space is converted to
a '%20' - which then seems to be changed to '%2520' when the re-sort search
is issued.

So the search returns no matches and the 'GET' url contains
'http://...&mv_searchspec=Penguin%2520Books'

I would be grateful if someone could offer any advice on how I could prevent
the '%20' from being converted to '%2520'.
Or should I be looking to remove the initial '%20' from the hidden form
field in the drop-down list search?

I am currently running Interchange 5.0

Many thanks

Steve



More information about the interchange-users mailing list