You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find this to be a rather odd behavior. It looks like the bang after the open comment tag confuses the parser into believing the entire rest of the string is still inside the comment. I don't know if this is intended but I don't think it should be.
Change https://go.dev/cl/442496 mentions this issue: html: properly handle exclamation marks in comments
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Oct 13, 2022
Properly handle the case where HTML comments begin with exclamation
marks and have no other content, i.e. "<!--!-->". Previously these
comments would cause the tokenizer to consider everything following to
also be considered part of the comment.
Fixesgolang/go#37771
Change-Id: I78ea310debc3846f145d62cba017055abc7fa4e0
Reviewed-on: https://go-review.googlesource.com/c/net/+/442496
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
This bug was found by fuzzing. See master issue #27848
What version of Go are you using (
go version
)?1.14
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Not relevant
What did you do?
https://play.golang.org/p/kSpNN8dsXkk
What did you expect to see?
What did you see instead?
Comment
I find this to be a rather odd behavior. It looks like the bang after the open comment tag confuses the parser into believing the entire rest of the string is still inside the comment. I don't know if this is intended but I don't think it should be.
Modern browsers seem to agree with my assessment: https://www.w3schools.com/code/tryit.asp?filename=GCOZ59QJSL6W
Edit: this happens also with "<" and other symbols.
/cc @katiehockman @FiloSottile @LMMilewski
The text was updated successfully, but these errors were encountered: