435 bytes, application/xhtml+xml
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>> </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.
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
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.