Actually encode search query strings correctly