Closed
Bug 296657
Opened 20 years ago
Closed 20 years ago
textContent outputs comment nodes
Categories
(Core :: DOM: Serializers, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jason.barnabe, Assigned: neil)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
|
301 bytes,
application/xhtml+xml
|
Details | |
|
956 bytes,
patch
|
sicking
:
review+
jst
:
superreview+
asa
:
approval1.8b3+
|
Details | Diff | Splinter Review |
DOM Core Level 3 says
"The string returned is made of the text content of this node depending on its
type, as defined below:
Node type:
ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
DOCUMENT_FRAGMENT_NODE
Content: concatenation of the textContent attribute value of every child node,
*excluding COMMENT_NODE* and PROCESSING_INSTRUCTION_NODE nodes. This is the
empty string if the node has no children."
We're not exluding comment nodes.
| Reporter | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 3•20 years ago
|
||
Oops :-[
bz, should I a) call IsContentTypeOf(eTEXT) and cast to nsITextContent, b) QI to
nsITextContent and call IsContentTypeOf(eTEXT) or c) something else?
Keywords: regression
b). Though do the IsContentOfType test first to avoid unneccesary QIs.
Comment 5•20 years ago
|
||
Remember that .textContent on a comment itself should return the text, just that
a parent of a comment should not include the comment. As described here:
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent
| Assignee | ||
Comment 7•20 years ago
|
||
Assignee: dom-to-text → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Attachment #185410 -
Flags: superreview?(jst)
Attachment #185410 -
Flags: review?(bugmail)
Attachment #185410 -
Flags: review?(bugmail) → review+
Comment 8•20 years ago
|
||
Comment on attachment 185410 [details] [diff] [review]
Belt and braces
sr=jst
Attachment #185410 -
Flags: superreview?(jst) → superreview+
| Assignee | ||
Comment 9•20 years ago
|
||
Comment on attachment 185410 [details] [diff] [review]
Belt and braces
seeking approval for regression fix.
Attachment #185410 -
Flags: approval1.8b3?
Updated•20 years ago
|
Attachment #185410 -
Flags: approval1.8b3? → approval1.8b3+
| Assignee | ||
Comment 10•20 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Flags: blocking1.8b3?
You need to log in
before you can comment on or make changes to this bug.
Description
•