Closed Bug 64448 Opened 24 years ago Closed 24 years ago

comments in internal subset moved to before the internal subset

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.8

People

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

References

()

Details

(Keywords: testcase, Whiteboard: [fixinhand?])

Attachments

(1 file)

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
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
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
Closed: 24 years ago
Resolution: --- → FIXED
Verified fixed per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: