diff --git a/src/pkg/html/token.go b/src/pkg/html/token.go index fddc922d60..d266b3a300 100644 --- a/src/pkg/html/token.go +++ b/src/pkg/html/token.go @@ -429,7 +429,7 @@ loop: for ; i < z.p1; i++ { c := z.buf[i] switch c { - case '<', '>', '"', '\'', '/', '=': + case '>', '/', '=': break loop } switch { diff --git a/src/pkg/html/token_test.go b/src/pkg/html/token_test.go index 1330f3247a..0a0beb201b 100644 --- a/src/pkg/html/token_test.go +++ b/src/pkg/html/token_test.go @@ -49,14 +49,24 @@ var tokenTests = []tokenTest{ }, { "malformed tag #1", + `
`, + `
`, + }, + { + "malformed tag #2", `
`, `
`, }, { - "malformed tag #2", + "malformed tag #3", `
`, }, + { + "malformed tag #4", + `
`, + `
`, + }, // Comments. { "comment0",