aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/html/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/html/parse.go')
-rw-r--r--src/pkg/html/parse.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go
index b92b25c7b0..5b91204240 100644
--- a/src/pkg/html/parse.go
+++ b/src/pkg/html/parse.go
@@ -619,6 +619,12 @@ func inBodyIM(p *parser) bool {
// TODO: detect <select> inside a table.
p.im = inSelectIM
return true
+ case "form":
+ if p.form == nil {
+ p.popUntil(buttonScopeStopTags, "p")
+ p.addElement(p.tok.Data, p.tok.Attr)
+ p.form = p.top()
+ }
case "li":
p.framesetOK = false
for i := len(p.oe) - 1; i >= 0; i-- {