Status: New Owner: ---- New issue 193 by he...@modondo.com: Multiple form tags gets nested http://code.google.com/p/html5lib/issues/detail?id=193
What steps will reproduce the problem? Parsing the following html5 document usingparser = html5lib.HTMLParser(tree=html5lib.treebuilders.getTreeBuilder("lxml"), namespaceHTMLElements=False)
soup = parser.parse(filedata) print lxml.html.tostring(soup, encoding=unicode) <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"; lang="sv-se"> <head> <meta charset="utf-8"/> <title>HTML5 test</title> </head> <body> <form action="" method="get" class="selector"> <select name="industry" id="industry" size="1" class="selector"> <option value="">Industry</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> </form> <form action="" method="get" class="selector"><select name="application" id="application" size="1" class="selector">
<option value="">Application</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> </form> <form action="" method="get" class="selector"> <select name="material" id="material" size="1" class="selector"> <option value="">Material</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> </form> </body> </html>============= What is the expected output? What do you see instead? ================
=========================== BECOMES ============================== NOTICE THE NEDING </form> tags before the </body> tag <!DOCTYPE html> <html lang="sv-se" xmlns="http://www.w3.org/1999/xhtml";><head> <meta charset="utf-8"> <title>HTML5 test</title> </head> <body> <form action="" class="selector" method="get"> <select size="1" id="industry" name="industry" class="selector"> <option value="">Industry</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> <form action="" class="selector" method="get"><select size="1" id="application" name="application" class="selector">
<option value="">Application</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> <form action="" class="selector" method="get"> <select size="1" id="material" name="material" class="selector"> <option value="">Material</option> <option value="option1">Item one</option> <option value="option1">Item two</option> <option value="option1">Item three</option> </select> </form></form></form></body></html> Please provide any additional information below.I'm parsing the document with the lxml treebuilder and outputting with lxml.html.tostring() method. Somehow all the forms gets nested.
-- You received this message because you are subscribed to the Google Groups "html5lib-discuss" group. To post to this group, send an email to html5lib-discuss@googlegroups.com. To unsubscribe from this group, send email to html5lib-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4