Closed Bug 171462 Opened 23 years ago Closed 23 years ago

Textarea does not correctly handle <textarea />

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: qirien, Assigned: alexsavulov)

Details

Attachments

(1 file)

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.
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
Closed: 23 years ago
Resolution: --- → INVALID
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
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://
OK, I guess I should've used .xhtml for the extension instead of .html.
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: