Fix search json redirect to work with spaces in queries.

This wasn't properly escaping the query string when redirecting.