diff options
| author | Andrew Balholm <andybalholm@gmail.com> | 2011-11-04 09:29:06 +1100 |
|---|---|---|
| committer | Nigel Tao <nigeltao@golang.org> | 2011-11-04 09:29:06 +1100 |
| commit | 46308d7d1191b75dc86f848dbc362616f5b0b0cb (patch) | |
| tree | 389c0b6c2478ab0602c768b7c61fafa55c965cd0 /src/pkg/html/parse.go | |
| parent | a7f1141dee05bf889b64401c787f08e1c8643e88 (diff) | |
| download | go-46308d7d1191b75dc86f848dbc362616f5b0b0cb.tar.xz | |
html: move <link> element from after <head> into <head>
Pass tests1.dat, test 85:
<head><meta></head><link>
| <html>
| <head>
| <meta>
| <link>
| <body>
R=nigeltao
CC=golang-dev
https://golang.org/cl/5297079
Diffstat (limited to 'src/pkg/html/parse.go')
| -rw-r--r-- | src/pkg/html/parse.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go index 38f8ba481a..0204b7c281 100644 --- a/src/pkg/html/parse.go +++ b/src/pkg/html/parse.go @@ -427,6 +427,7 @@ func beforeHeadIM(p *parser) (insertionMode, bool) { } if add || implied { p.addElement("head", attr) + p.head = p.top() } return inHeadIM, !implied } @@ -511,7 +512,9 @@ func afterHeadIM(p *parser) (insertionMode, bool) { case "frameset": // TODO. case "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "title": - // TODO. + p.oe = append(p.oe, p.head) + defer p.oe.pop() + return useTheRulesFor(p, afterHeadIM, inHeadIM) case "head": // TODO. default: |
