Textarea does not correctly handle <textarea />

RESOLVED INVALID

Status

()

Core
HTML: Form Submission
RESOLVED INVALID
15 years ago
13 years ago

People

(Reporter: Andrea Landaker, Assigned: Alexandru Savulov)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
The code sample for this is very simple:

<html>
<body>
<form>
<textarea/>
</form>
</body>
</html>

Notice that Mozilla interprets all the HTML after the <textarea/> as the text of
the textarea box.  As far as I know this is legal HTML, and the textarea should
be interpreted as closed.

Comment 1

15 years ago
I don't think that's valid HTML.   Reporter: Do you have any source that proves
otherwise?
This HTML is equivalent to:

<html>
<body>
<form>
<textarea>&gt;
</form>
</body>
</html>

(and yes, I know we do not parse it that way, but that's what the SGML rules say
it should be).  This is patently not valid -- the <textarea> is not closed.

If this is XHTML being served as text/html, this is not valid because it
violates Appendix C.

If this is XHTML being served as text/xml or some other XML type, please reopen
the bug; in that case we have a problem.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID

Comment 3

13 years ago
Created attachment 183789 [details]
Sample valid XHTML file which demonstrates the issue

This file is valid XHTML 1.0 Strict (according to the W3C validator), with a
<meta /> tag describing the Content-Type, and yet everything after the
<textarea /> tag appears inside the text area.
No, it doesn't.  Just try loading the very file you attached:
https://bugzilla.mozilla.org/attachment.cgi?id=183789

Comment 5

13 years ago
Hmm, strange. It seems that <meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=utf-8" /> wasn't enough for the page to
be rendered as XHTML -- the attachment is displayed properly.
> wasn't enough for the page to be rendered as XHTML

The server-sent MIME type (if any) takes precedence over the <meta> tag.  So
does the file extension if loading via file://

Comment 7

13 years ago
OK, I guess I should've used .xhtml for the extension instead of .html.
You need to log in before you can comment on or make changes to this bug.