Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html tokenizer tries (and fails) tokenizing CDATA sections if they contain 'tags'. #1751

Closed
vdobler opened this issue Apr 29, 2011 · 2 comments

Comments

@vdobler
Copy link
Contributor

vdobler commented Apr 29, 2011

What steps will reproduce the problem?
Try to tokenize valid HTML where CDATA section contains 'tags'

What is the expected output?
No tokenization inside CDATA section is done.
See
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#cdata-section-state

What do you see instead?
html.Tokenizer will report <x> from "<![CDATA[ <x> ]]>"


Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Windows 7

Which revision are you using?  (hg identify)
gowin32_2011-03-07.1 (unsure which hg revision really)

Please provide any additional information below.

This bug is related to 1661 where javascript code gets missparsed.
issue #1661 would vanish for javascript which is properly enclosed
in a CDATA section if this bug would be solved.

Simple bug-triggering demo attached

Attachments:

  1. bug.go (415 bytes)
@nigeltao
Copy link
Contributor

nigeltao commented May 2, 2011

Comment 1:

Yes, the html package is incomplete and full of known TODOs. I hope to get back to
working on it in May/June.

Owner changed to @nigeltao.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2011

Comment 2:

Status changed to Duplicate.

Merged into issue #2341.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants