URL encode the query string in query mode