Closed
Bug 24840
Opened 25 years ago
Closed 25 years ago
text with markup created with createTextNode() not parsed into appropriate nodes
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: myk, Assigned: vidur)
References
()
Details
Overview Description:
Steps to Reproduce:
1) In the JavaScript code of a web page, create text node that contains HTML
markup using the function createTextNode;
2) Call a function that adds that text node to the page using f.e. the function
appendChild on the element document.body.
3) Notice that the text node was not parsed into a series of nodes corresponding
to its HTML markup but rather is inserted into the document as if the markup was
plain text.
Actual Results:
Text is inserted into the document as if it was plain text.
Expected Results:
Per DOM 1 spec, text is parsed into nodes based on the text's markup and
displayed as HTML text.
Build Date & Platform Bug Found:
2000-01-21-08 Linux RedHat 6.0 i386
Additional Builds and Platforms Tested On:
None
Additional Information:
Here's a quote from DOM 1 standard that leads me to believe this is errant
behavior:
http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1312295772
-----
The Text interface represents the textual content (termed character data in XML)
of an Element or Attr. If there is no markup inside an element's content, the
text is contained in a single object implementing the Text interface that is the
only child of the element. If there is markup, it is parsed into a list of
elements and Text nodes that form the list of children of the element.
-----
Assignee | ||
Comment 1•25 years ago
|
||
I'll propose to the W3C DOM Working Group that we revise the wording that you
quote in the bug report. The spec is trying to indicate that Text nodes
represent contiguous runs of character data in the original document, not that
the contents of a text node (either the initial content specified in
document.createTextNode or dynamic changes through the text.data attribute) is
parsed into subtrees containing Elements and their content.
Currently, there is no standard way of creating a subtree from an unparsed
string containing markup. I'm trying to push a short-term agreement on syntax
within the standards group. See bug 9201 for alternatives in Mozilla.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•25 years ago
|
||
Vidur should know. Marking this verified.
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•