fixes #2964 - url parameters not being encoded