Closed
Bug 53411
Opened 25 years ago
Closed 25 years ago
Odd behavior for TextAreas when attempting to display XML
Categories
(Core :: DOM: HTML Parser, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: djoham, Assigned: rickg)
Details
(Keywords: compat)
Attachments
(1 file)
|
881 bytes,
text/html
|
Details |
Build ID: 2000092008 (Linux) and 2000091508(Windows2000)
Description:
If you use a text area to display XML content, Mozilla will get confused as to
what the content/value of the TEXTAREA is. For example, if I have the following
code:
<TEXTAREA>
<?xml version="1.0"?>
<DOCUMENT id="hello">
<STUFF>
more stuff
</STUFF>
</DOCUMENT>
</TEXTAREA>
Mozilla will render the second line of the XML in the textarea like this:
<DOCUMENT id="hello">id="hello"
Attempting to get the value of the textarea from javascript will also give you
the extra id="hello" that doesn't belong ther.
You can work around this problem by putting a space between the < and the D in
the line. If you do that, Mozilla will render the information correctly.
This problem will occur at any time you have an attribute of an XML tag.
IE 5.5 renders correctly as does NN4.7
This is new from Mozilla M17 which does not show this problem.
To reproduce, open the test case I'll submit.
This is reproducable all the time.
I would expect that mozilla would simply render whatever I put into the
textarea, no matter the formatting.
Uh, oops. The button should say "press me" not "disable me". Sorry. Remnant from
another test case :)
Comment 3•25 years ago
|
||
OK I have this bug as well. I have a web form with a textbox that displays some
html content. And mozilla mixes up. It works in M17, with IE and Netscape also,
but not with the current M18.
I copied my script in a public area to reproduce the problem:
the script lives at:
http://www.qeradiant.com/mozillabug/post.cgi
and you can view the page at:
http://www.qeradiant.com/mozillabug
if you try to post an url like <a href="http://www.mozilla.org">mozilla</a> and
post it, the page will update right but the refreshing of the textbox will bring
<a href="http://www.mozilla.org">"http://www.mozilla.org"mozilla</a> .. so it
will be screwed up next time you post.
Comment 4•25 years ago
|
||
Rick, Harish: This is probably the same as the bug with <plaintext> and the
attributes. Certainly the same symptoms according to the description.
djoham: This markup is completely invalid. You cannot just put arbitrary markup
in <textarea>, you have to escape it (<, >). See the HTML4 spec.
http://www.w3.org/TR/html4
Assignee: rods → rickg
Component: HTML Form Controls → Parser
Keywords: compat
QA Contact: ckritzer → janc
Comment 5•25 years ago
|
||
I just tried this out with linux trunk build 2000103108, and I get the behavior
reporter expects to get (in spite of invalid markup and all that).
Reporter, could you try a recent build? It looks like the problem has been fixed...
Looks good to me as well. Marking fixed. Thanks
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified on:
build: 2001-06-04-09-Mtrunk
platform: WinNT
The attached test case loads fine.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•