aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/html/parse.go
diff options
context:
space:
mode:
authorAndrew Balholm <andybalholm@gmail.com>2011-11-11 21:44:01 +1100
committerNigel Tao <nigeltao@golang.org>2011-11-11 21:44:01 +1100
commit0a61c846ef36dc43437e37c6494a40b47824124f (patch)
tree9b722bf14b12de50ae5dc236da97c505a52275a9 /src/pkg/html/parse.go
parent83f61a27d6f1ef053c00b4cc2fd9668fdf354ad8 (diff)
downloadgo-0a61c846ef36dc43437e37c6494a40b47824124f.tar.xz
html: ignore <col> tag outside tables
Pass tests1.dat, test 109: <table><col><tbody><col><tr><col><td><col></table><col> | <html> | <head> | <body> | <table> | <colgroup> | <col> | <tbody> | <colgroup> | <col> | <tbody> | <tr> | <colgroup> | <col> | <tbody> | <tr> | <td> | <colgroup> | <col> Also pass test 110: <table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup> R=nigeltao CC=golang-dev https://golang.org/cl/5369069
Diffstat (limited to 'src/pkg/html/parse.go')
-rw-r--r--src/pkg/html/parse.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go
index 6aef7e12ed..e609cce129 100644
--- a/src/pkg/html/parse.go
+++ b/src/pkg/html/parse.go
@@ -667,6 +667,8 @@ func inBodyIM(p *parser) (insertionMode, bool) {
case "image":
p.tok.Data = "img"
return inBodyIM, false
+ case "caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr":
+ // Ignore the token.
default:
// TODO.
p.addElement(p.tok.Data, p.tok.Attr)