Closed
Bug 9781
Opened 25 years ago
Closed 25 years ago
CDATA sections become Text nodes
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: dbaron, Assigned: nisheeth_mozilla)
Details
CDATA sections are becoming Text nodes, when they should be CDATA nodes. Furthermore, separate CDATA sections should (I'm 98% sure) be separate CDATA nodes (should that be changed by normalize???). I have tested CDATA sections in the following 2 tests, which may have significant errors in them right now in the normalize() section, since they are just copies of my Text tests: http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/CDATASection http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/CDATASection_2 In the first test, only the first test line is red. This shows that the CDATA section is being treated as a text node. The greatly increased number of problems in the second test shows that the 2 CDATA sections are being treated as *one* text node. They should be two CDATA nodes.
Reporter | ||
Comment 1•25 years ago
|
||
I forgot to mention: other problems in these tests are discussed in bug 9777, bug 9778, and bug 9779.
Reporter | ||
Comment 2•25 years ago
|
||
The normalize() sections in the above tests are fixed. The DOM1 spec specifically says normalize() doesn't affect CDATA sections.
Target Milestone: M15
Is this a DOM bug or a content-sink bug?
HTML DOM bugs are M11/P2 for Vidur.
Updated•25 years ago
|
Assignee: vidur → nisheeth
Comment 5•25 years ago
|
||
Passing along XML bugs to Nisheeth.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•25 years ago
|
||
Johnny Stenbeck (jst@citec.fi) has submitted a patch that fixes this. I'm going to check in his changes as soon as the tree opens. We weren't creating CDATA tokens in the tokenizer. Now we do.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•25 years ago
|
||
The fix is checked in. CCing Johnny. Thanks a lot for the patch, Johnny.
Comment 8•25 years ago
|
||
dbaron, would you verify this? I've taken a quick peek @ the two test files you put together (nice job, by the way) and I'd like to get your OK since you know your test files better.
Reporter | ||
Comment 9•25 years ago
|
||
I'll try to remember to check five hours from now... the verification builds don't hit mozilla.org until 2PM PDT = 5PM EDT = 5 hours 10 minutes away...
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
OS: Linux → All
Target Milestone: M11 → M1
Reporter | ||
Comment 10•25 years ago
|
||
Verified fixed, since all tests are green - Linux apprunner 1999102808.
Reporter | ||
Updated•25 years ago
|
OS: All → Linux
Target Milestone: M1 → M11
Reporter | ||
Comment 11•25 years ago
|
||
Undoing seemingly random modifications. I think it's a mozilla bug...
Reporter | ||
Comment 12•25 years ago
|
||
There were actually some bugs in my tests, and they weren't running to the end. The bug is still fixed, though, but there's one (minor) new bug that was uncovered... I'll file it later.
Comment 13•25 years ago
|
||
dbaron@fas.harvard.edu: Please CC me in the new bug (or file it against me). Thank you.
Reporter | ||
Comment 14•25 years ago
|
||
The bug is actually a bug in Normalize(). See bug 9779. I though Normalize() was not implemented at all, but actually it does some stuff (not much), and it does it to CDATA sections in addition to text nodes, because it checks the tag name rather than the node type. (I imagine that could mess up comments too...)
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•