Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Duplicated form parameters when form is submitted repeatedly #5710
I have a page that looks like this:
If I type something in the search input, for example "foo", I will get redirected to http://path.to.my.site/search?searchQuery=foo. After that page loads, if I type something else, for example "bar", I will get redirected to http://path.to.my.site/search?searchQuery=foo&searchQuery=bar. Note the double searchQuery parameters.
If I don't use jQuery Mobile, I am simply redirected to http://path.to.my.site/search?searchQuery=bar. I don't know if this is a bug or intended behavior.
I can work around this bug by putting an action attribute on the form but I think this is still worth mentioning.
The reason I left the check in place is that I was thinking that, if the form is submitted via POST, the URL could contain a query string, in which case those variables will be received on the server side in the GET array, whereas the data will be received in the POST array.