encode url before search.