Closed
Bug 5544
Opened 26 years ago
Closed 26 years ago
Comment nodes in the content model contain markup delimeters
Categories
(Core :: DOM: HTML Parser, defect, P3)
Tracking
()
M6
People
(Reporter: kostello, Assigned: rickg)
References
Details
(Whiteboard: 7/9 waiting for developer response to dbaron who says that #6071 (& hence this bug) is not fixed.)
Attachments
(1 file)
(deleted),
text/html
|
Details |
Comment nodes in the content model are storing the delimiters as well as the
contents. According to Vidur, this should be changed. RickG will remove the
delimeters during the parse process.
Updated•26 years ago
|
QA Contact: 3847 → 4141
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed by stripping the comment tag delimiters <!..>.
Let me know if you see anything break due to this; I tested script and style
tags.
Comment 4•26 years ago
|
||
Attempting to steal gem's HTMLParser bugs all at once. Changing QAContact to
janc.
Comment 6•26 years ago
|
||
Bug 6071 is not fixed. I don't know whether you want to hold the delimiters in
the content model or add them only when the DOM returns them. You should do one
or the other.
Updated•26 years ago
|
Whiteboard: 6/21 waiting for developer response to dbaron who says that #6071 (& hense this bug) is not fixed.
Updated•26 years ago
|
Whiteboard: 6/21 waiting for developer response to dbaron who says that #6071 (& hense this bug) is not fixed. → 6/21 waiting for developer response to dbaron who says that #6071 (& hence this bug) is not fixed.
Comment 7•26 years ago
|
||
If you want to keep the current internal representation of comments, you could
reopen bug 6071 and make it so comment nodes nodeValues are just returned
differently when accessed in the DOM.
Updated•26 years ago
|
Whiteboard: 6/21 waiting for developer response to dbaron who says that #6071 (& hence this bug) is not fixed. → 7/9 waiting for developer response to dbaron who says that #6071 (& hence this bug) is not fixed.
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Comment 8•26 years ago
|
||
It would be a little more complicated than just that (my previous comment)
because you also need to get all the text manipulation functions to work based
on the 4-character offset. That would be a pain I think.
Also, since this is working correctly in XML, but not HTML, and since having two
bugs that are RESOLVED doesn't get much attention, I'm going to reopen this
one. Compare the following to see why I think you may be better off not storing
the delimiters in the content model:
http://www.fas.harvard.edu/~dbaron/dom/test/one-core-html/Comment
http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/Comment
I don't think the comment delimiters should be removable through the DOM, nor
should all the substringData/insertData/appendData/deleteData have their offsets
messed up. Right now, the test is fine in XML, and all wrong in HTML.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: FIXED → WONTFIX
I pass the comments through without changing the delimiters. We can't remove
them in the case of script, and so we won't remove them anywhere.
Comment 10•26 years ago
|
||
Is that still true now that bug 7853 has been fixed?
The correct way to parse SCRIPT and STYLE is with a CDATA content model, which
means that <!-- and --> have no special meaning, and do not cause comment nodes
to be generated. I think this may be being done correctly now that bug 7853 is
fixed (though I'd have to check). This would mean that you don't need to store
the delimiters. This is the "right way" to do things according to the
SGML/HTML/DOM specs (using the DOM's definition of a comment, not SGML's).
Leaving as RESOLVED-WONTFIX, for now.
Comment 11•26 years ago
|
||
Comment 12•26 years ago
|
||
Comment 13•26 years ago
|
||
Well, rickg marked this Won't Fix. And it seems like here that the other bugs
cover ths issue. Reopen 7853 if still an open issue. Thanks!
Comment 14•26 years ago
|
||
I reopened bug 6071.
Updated•26 years ago
|
Status: VERIFIED → REOPENED
Comment 15•26 years ago
|
||
This is incorrect w.r.t. the DOM. Delimiters should be stripped either by the
parser or by the Comment content class when returning the data. In past
conversations with RickG, I was under the impression that the parser would strip
them. This should be orthogonal to their inclusion in SCRIPT and STYLE elements,
since in those cases, they should come through in the skipped content for the
elements.
Reopening. Rick, please talk to me if you have any questions.
Updated•26 years ago
|
Resolution: WONTFIX → ---
Updated•26 years ago
|
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → DUPLICATE
Comment 16•26 years ago
|
||
Oops, my change clashed with David's. 6071 is the reopened version.
*** This bug has been marked as a duplicate of 6071 ***
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 17•26 years ago
|
||
verified dup
You need to log in
before you can comment on or make changes to this bug.
Description
•