XML well-formed content of textarea element gets corrupted in the rendering

RESOLVED DUPLICATE of bug 64799

Status

()

Core
Layout: Form Controls
RESOLVED DUPLICATE of bug 64799
15 years ago
15 years ago

People

(Reporter: Anders Sønderberg Mortensen, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Have a look at the URL http://test.indexdata.dk/sondberg/error.html

The content of the textarea field should be <P></P> but is rendered as <P></p>.
The same applies to the <BR></BR> constellation while the <TEST></TEST>
constellation works as expected.

It looks like the browser inserts HTML elements differently from other elements.

What makes this bug extra weird is that <P></P> is internally in Mozilla
converted into <p></p> and likewise with <BR></BR>, while no conversion takes
place for <TEST></TEST>.

Reproducible: Always

Steps to Reproduce:
1.Load the Mozilla browser
2.Point the browser at the URL http://test.indexdata.dk/sondberg/error.html
3.Compare the content of the textarea field with the source code of the web-page
4.Eventually, try to connect directly to the web-server with telnet, i.e.

% telnet test.indexdata.dk 80
GET /sondberg/error.html HTTP/1.1 <return>
Host: test.indexdata.dk <return>
<return>

5. Compare the result with (2) and (3).


Actual Results:  
The content of the textarea field is this (in the browser window):
<P></p>
<BR></br>
<TEST></TEST>

The corresponding client side HTML source code reads:
<p></p>
<br></br>
<TEST></TEST>

And the original server side HTML reads:
<P></P>
<BR></BR>
<TEST></TEST>


Expected Results:  
Two different issues confused me:

1) Mozilla converts capital html elements, i.e. <P></P> and <BR></BR> to
lowercase elements, i.e. <p></p> and <br></br>. I expected no case conversion at
this stage! This issue, however, is not really a problem for me in itself.

2) Mozilla seems to render <P></P> as <P></p> and likewise for a collection of
other empty HTML elements, where I expected <P></P> to be rendered as <P></P> etc.

Especially, issue no. 2 is frustrating, because it eventually breaks XML
well-formedness.

I can add that I've been able to demonstrate the bug in Mozilla 1.2 and 1.5 on
windows, and 1.5 on Linux. Internet Explorer as well as Konqouror don't have
this problem.
Confirmed on WinXP trunk 2003102004.
OS: Linux → All

Comment 2

15 years ago
Source code should be escaped. Save the file as .xhtml (content-type =
application/xhtml+xml) and you will see that the textarea is empty. I can add a
test case which demonstrates this if you want.

But it is invalid, so I think you can't predict then, what will happen.

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