Strip the + symbol from the_search_query

Personally, when I do things like this I use str_replace() [Link]

Using your above example it would be implemented like so:

<?php 
    $string = the_search_query();
    $res = str_replace("+", " ", $string);
    echo $res;
?>

That will replace any + with a space.

Or if you want the &nbsp; use this:

<?php 
    $string = the_search_query();
    $res = str_replace("+", "&nbsp;", $string);
    echo $res;
?>

On a minor note, this question is not really WP related and may get bounced to StackOverflow or closed by a mod.