x/net/html: Unable to parse conditional comments #46261
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
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to parse a conditional comment tag
<!--[if mso]>
. See https://en.wikipedia.org/wiki/Conditional_comment for more details.https://play.golang.org/p/TSUYq9g4i4r
What did you expect to see?
I expect the parser recognize not only standard comments(
<!-- Comment content -->
), but also downlevel-hidden(<!--[if expression]> HTML <![endif]-->
) and downlevel-revealed(<![if expression]> HTML <![endif]>
) comments.What did you see instead?
Note how '<!--[if mso]>' is not even recognized as a tag and how all comments are forced into the dash format, regardles if they had dashes or not.
The text was updated successfully, but these errors were encountered: