Skip to content

Commit

Permalink
html: don't ignore token when current token is not <template>
Browse files Browse the repository at this point in the history
Updates golang/go#23071

Change-Id: I36b0ee58f61b7de25730e0fb082eeb7ef2787594
Reviewed-on: https://go-review.googlesource.com/123920
Run-TryBot: Kunpei Sakai <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Nigel Tao <[email protected]>
  • Loading branch information
namusyaka authored and nigeltao committed Aug 11, 2018
1 parent f9ce57c commit c394268
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions html/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,6 @@ func inHeadIM(p *parser) bool {
return true
}
p.generateAllImpliedEndTags()
if n := p.oe.top(); n.DataAtom != a.Template {
return true
}
p.popUntil(defaultScope, a.Template)
p.clearActiveFormattingElements()
p.templateStack.pop()
Expand Down
16 changes: 16 additions & 0 deletions html/testdata/webkit/template.dat
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,22 @@
| <tr>
| <tfoot>

#data
<body><template><template><b><template></template></template>text</template>
#errors
#document
| <html>
| <head>
| <body>
| <template>
| content
| <template>
| content
| <b>
| <template>
| content
| "text"

#data
<body><template><col><colgroup>
#errors
Expand Down

0 comments on commit c394268

Please sign in to comment.