make the search formatting nicer to read

This also happens to fix a problem with spaces in search terms.