Hi.

I've noticed that if you search writing a text with spaces it doesn't find anything. I've looked the code and found that:

function profilesearch_search_form_submit($form_id, $form_values) {

$searchstring = str_replace(" ", "+", $form_values['search']);

return 'profilesearch/'. $searchstring;
}

If you use "$searchstring = str_replace(" ", " ", $form_values['search']);" instead, it works fine. It's like doing nothing. Is there a reason why it is used the replacing?

Bye! And thanks in advance!

Comments

Crell’s picture

The replacement there modeled on search.module, and I think is from the original code. There's probably a better way of doing it, to be honest. :-) Patches welcome.

javieras’s picture

Thanks. I've deleted this line "$searchstring = str_replace(" ", "+", $form_values['search']);" till i have time to see another way to do it.

Bye!

bfr’s picture

Status: Active » Closed (won't fix)

Not very realistic that anyone is going to update the 5.x branch anymore.