A simple work around should be to remove one of the two "myName" parameters and then set the right value to the remaining "myName" parameter. But I can't use removeParameter() because the parameters are hidden.
So, is there a solution to bypass this problem with the current implementation ?
Is this legal to have several parameters with the same name ?
Note: the only workaround that I've found is to discard duplicated parameters in the getFormControls() of the WebForm class.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For some reasons, when parsing an ill-formed HTML page, JTidy can create a form that has several parameters with the same name.
ex :
<form>
<input name="myName" value="val1" type="hidden">
<input name="myName" value="val2" type="hidden">
</form>
A simple work around should be to remove one of the two "myName" parameters and then set the right value to the remaining "myName" parameter. But I can't use removeParameter() because the parameters are hidden.
So, is there a solution to bypass this problem with the current implementation ?
Is this legal to have several parameters with the same name ?
Note: the only workaround that I've found is to discard duplicated parameters in the getFormControls() of the WebForm class.