x/net/html: Parse() adds duplicate elements #23487
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOOS="darwin"
What did you do?
https://play.golang.org/p/M3PUK90dQhM
What did you expect to see?
What did you see instead?
Notice the duplicate
<a href="some_link"></a>
From what I understand https://github.com/golang/net/blob/master/html/parse.go#L347 removes identical opening element and before it has a chance to remove respective closing element, reconstructActiveFormattingElements() "fixes" the "broken" structure
The text was updated successfully, but these errors were encountered: