We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9af49ef commit b935f7bCopy full SHA for b935f7b
html/parse.go
@@ -840,6 +840,10 @@ func afterHeadIM(p *parser) bool {
840
841
p.parseImpliedToken(StartTagToken, a.Body, a.Body.String())
842
p.framesetOK = true
843
+ if p.tok.Type == ErrorToken {
844
+ // Stop parsing.
845
+ return true
846
+ }
847
return false
848
}
849
html/parse_test.go
@@ -468,6 +468,7 @@ func TestParseFragmentForeignContentTemplates(t *testing.T) {
468
srcs := []string{
469
"<math><html><template><mn><template></template></template>",
470
"<math><math><head><mi><template>",
471
+ "<svg><head><title><select><input>",
472
473
for _, src := range srcs {
474
// The next line shouldn't infinite-loop.
0 commit comments