evilGmonkey / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

cannot encode urls in form list #332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. put the following form list on the server:

<forms>
  <form url="http%3A%2F%2Fwww.example.com%2Fgetform%3Fsomeparam%3D123%26otherparam%3D456">my form</form>
</forms>

Note that the above url is just 
http://www.example.com/getform?someparam=123&otherparam=456 url-encoded

2. have odk collect get new forms. The form will appear in the list
3. try to get the form.

What is the expected output? What do you see instead?

Expected is that ODK Collect should decode the url and get the form from 
http://www.example.com/getform?someparam=123&otherparam=456.

Instead, it gives the following error:

Form ... failed. Protocol not found: 
http%3A%2F%2Fwww.example.com%2Fgetform%3Fsomeparam%3D123%26otherparam%3D456

If you don't url-encode the url, you'll get an error when retrieving the 
formList, because the "&" inside the url attribute triggers a xml parsing error 
(which is expected).

So basically you cannot retrieve forms that have a "&" in the url.

Original issue reported on code.google.com by matteosi...@gmail.com on 23 Sep 2011 at 3:49

GoogleCodeExporter commented 9 years ago

Original comment by wbrune...@gmail.com on 23 Sep 2011 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 4 Oct 2011 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 4 Oct 2011 at 8:54