Sanitize the search query.