User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:220.127.116.11) Gecko/2008092417 Firefox/3.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/2008092417 Firefox/3.0.3 <!-- It seems that this form's close tag is just ignored --> <form action="somepage.htm" method="get"> <input type="text" name"somename"> </form> <!-- the following will be added the the closed form --> <input type="text" name"somename"> <input type="text" name"someothername"> Reproducible: Always Steps to Reproduce: 1. Make a webpage with input elements inserted after a close form tag, but before an open form tag. 2. When the page is loaded the DOM adds those elements to the previously closed form Actual Results: The DOM adds elements inserted after a close form but before an open form tag to the previous form. This will then submit all those input elements on POST or GET, which causes PHP (and probably other programs) to take the last elements with the same name, even though they shouldn't have been submitted. Expected Results: The DOM should not add input elements to any form if they are not within the open and close form tags.
Works fine for me; only for first "somename" gets submitted. Can you attach a complete but simple testcase that demonstrates the bug? Submitting to a non-existent URL is fine as long as the bug can be demonstrated with GET URLs.
Component: General → HTML: Form Submission
Product: Firefox → Core
QA Contact: general → form-submission
It turns out I had an open table tag after the open form tag, but switched them afterward. That's what was causing the bug. <!-- It seems that this form's close tag is just ignored --> <form action="somepage.htm" name="f" method="get"> <table> <input type="text" name="somename" /> <input type="submit" /> </form> </table> <!-- the following will be added to the form that should have closed --> <input type="text" name="somename" /> <input type="text" name="someothername" />
Closing the <table> prematurely would be even more visible, so I think Firefox's behavior is reasonable. mrbkap's and HTML5's call though.
Component: HTML: Form Submission → HTML: Parser
QA Contact: form-submission → parser
It's not visible if the elements that are not part of that form are also not supposed to be part of that table.
WONTFIX per HTML5. If you disagree, please provide evidence of real-world site incompatibilities.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.