CDATA sections not properly rendered on TEXTAREA

RESOLVED DUPLICATE of bug 105937

Status

SeaMonkey
General
RESOLVED DUPLICATE of bug 105937
15 years ago
14 years ago

People

(Reporter: James B, Unassigned)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425

If you embed XML tags inside a TEXTAREA, the CDATA sections are missing.
E.g. Your HTML contains this fragment:
<TEXTAREA id="xxx"><test><![CDATA[--test--]]></test></TEXTAREA>

DOM access to the textarea's content as well as display on the screen will show
the content as: [CDATA[--test--]] 

The opening <! and closing > is missing.

This problem also appears in Mozilla Release 1.3.


Reproducible: Always

Steps to Reproduce:
1. Create an HTML fragment that contains CDATA section in a TEXTAREA, example:
<TEXTAREA id="xxx"><test><![CDATA[--test--]]></test></TEXTAREA>

2. use a script to get the text area content, e.g.
document.getElementById("xxx").value or document.getElementById("xxx").innerHTML.



Actual Results:  
1. For step 1 above, observe that the resulting display of the content from the
browser. Observe that the <! and > at the beginning and end of CDATA sections
are missing. It shows [CDATA[--test--]]

2. For step 2 above, observe that the value returned by the script also lack the
<! and > characters. The value returned is [CDATA[--test--]]

Expected Results:  
Mozilla should preserve the <! and >, the value both seen and fetched by DOM
should be <![CDATA[--test--]]>
I have a patch I hope will fix this in the 1.5 cycle (it's big!)

*** This bug has been marked as a duplicate of 105937 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.