comments in internal subset moved to before the internal subset

VERIFIED FIXED in mozilla0.8

Status

()

VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)

Tracking

({testcase})

Trunk
mozilla0.8
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixinhand?], URL)

Attachments

(1 attachment)

Look at the testcase in the URL. I found this bug when fixing bug 44564.

I am guessing the problem is that the parser sees an internal subset begin, and
starts collecting the data in there. It then finds the comment, and sends it to
the content sink. Then it finds the internal subset close, and sends the
internal subset to content sink.

So it looks like we would need to suppress the processing of comments while we
are in the internal subset.
Status: NEW → ASSIGNED
Keywords: testcase
Target Milestone: --- → mozilla0.9
Created attachment 21891 [details] [diff] [review]
Proposed fix with NS_GET_IID corrections as well
This seems to be simple. In nsExpatTokenizer::HandleComment() method I check the
parser state and if we are in the doctype just append the comment into the
doctype text, and do not create a comment token. The patch also fixes some
static global variables (to use the NS_GET_IID macro). While doing this I
noticed nsITokenizer interface does not have the static GetIID() method so I
added that as well.
Whiteboard: [fixinhand?]
Target Milestone: mozilla0.9 → mozilla0.8

Comment 3

18 years ago
sr=vidur. I'm assuming that the comment text passed to us by expat doesn't
already include the delimiters.
Fix checked in. Oh, and by the way, this was r=harishd.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 5

18 years ago
Verified fixed per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.