Commit c3942689 authored by Kunpei Sakai's avatar Kunpei Sakai Committed by Nigel Tao

html: don't ignore token when current token is not <template>

Updates golang/go#23071

Change-Id: I36b0ee58f61b7de25730e0fb082eeb7ef2787594
Reviewed-on: https://go-review.googlesource.com/123920
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
parent f9ce57c1
...@@ -680,9 +680,6 @@ func inHeadIM(p *parser) bool { ...@@ -680,9 +680,6 @@ func inHeadIM(p *parser) bool {
return true return true
} }
p.generateAllImpliedEndTags() p.generateAllImpliedEndTags()
if n := p.oe.top(); n.DataAtom != a.Template {
return true
}
p.popUntil(defaultScope, a.Template) p.popUntil(defaultScope, a.Template)
p.clearActiveFormattingElements() p.clearActiveFormattingElements()
p.templateStack.pop() p.templateStack.pop()
......
...@@ -859,6 +859,22 @@ ...@@ -859,6 +859,22 @@
| <tr> | <tr>
| <tfoot> | <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 #data
<body><template><col><colgroup> <body><template><col><colgroup>
#errors #errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment