x/net/html: readRawOrRCDATA() parsing issue when text ends with '<' #20741
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.8.3
golang.org/x/net/html: 057a25b06247e0c51ba15d8ae475feb2fcb72164
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Tried to parse HTML that contains a textarea that ends with
<
. Minimal example below:What did you expect to see?
<textarea> $ends with <$ </textarea>
What did you see instead?
<textarea> $ends with <</textarea>$
Possible solution
This diff fixes the problem and passes all tests, but not sure it is correct in all cases and according to the HTML spec:
The text was updated successfully, but these errors were encountered: