Last Comment Bug 162653 - <textarea/> doesn't work correctly (XHTML served as text/html using XML-style self-closing tags)
: <textarea/> doesn't work correctly (XHTML served as text/html using XML-style...
Status: VERIFIED INVALID
:
Product: Core
Classification: Components
Component: HTML: Parser (show other bugs)
: Trunk
: All All
: -- major (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 181996 193634 203398 268477 273855 281074 314220 322892 339787 369609 374758 381390 387349 397346 400280 404954 408528 409218 410303 415153 416176 419833 419838 420728 434651 441144 455831 458596 486695 495054 502581 504799 507944 532058 660108 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-14 03:47 PDT by David Corbin
Modified: 2011-08-23 19:36 PDT (History)
40 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Example of xhtml document with "failure" (844 bytes, application/xhtml+xml)
2002-08-14 07:16 PDT, David Corbin
no flags Details

Description David Corbin 2002-08-14 03:47:46 PDT
I have an XHTML Transitional document (don't know if that actually matters). 
When I put in a textarea as an empty tag (<textarea/>), I get differrent
behavior than if I use <textarea></textarea>.  The "different behavior" was the
rest of my XHTML document text showing up IN the textarea, and not on the page.
  As my XHTML is generated from a server-side DOM, working around this bug is
very hard.
Comment 1 Christopher Aillon (sabbatical, not receiving bugmail) 2002-08-14 03:55:23 PDT
Could you at least give us a URL or upload a page so we can see this ourselves?
Comment 2 Boris Zbarsky [:bz] 2002-08-14 04:01:25 PDT
You are serving your XHTML as text/html.  According to the XHTML 1.0
specification, you may only do this if your XHTML follows the Appendix C
compatibility guidelines.  The use of <textarea /> instead of
<textarea></textarea> violates section C.3 of appendix C.

If you want us to parse your XHTML as XML, please give it the correct MIME type
(text/xml or application/xhtml+xml).
Comment 3 David Corbin 2002-08-14 07:16:14 PDT
Created attachment 95252 [details]
Example of xhtml document with "failure"
Comment 4 David Corbin 2002-08-14 07:19:07 PDT
When I set the content type as "xml", the content is displayed, but it contains
no formatteing.  I've attempted to set the content-type to "xhtml+xml", but I've
had some problems caused by our framework not accepting that.  I'll keep working
on that and see if that improves things.

I'll admit to not knowing the details of the spec, but it seems to me with the
XML declaration and the document DTD specified, it should be clear that it is
xhtml and not html.
Comment 5 Boris Zbarsky [:bz] 2002-08-14 10:59:01 PDT
Comment on attachment 95252 [details]
Example of xhtml document with "failure"

fixing bogus MIME type
Comment 6 Boris Zbarsky [:bz] 2002-08-14 11:01:39 PDT
You need to put an "xmlns" attribute whose value is the XHTML namespace on your
root element... see the examples in the XHTML specification.  Then formatting
will happen like you want.

We _could_ content-sniff the document, but that would be just like sniffing
text/plain documents to see whether we think they are HTML.  Instead, we follow
the HTTP standard and use the content-type given by the server.  text/html is
parsed with the HTML parser, not the XML parser.
Comment 7 Wesha 2002-08-14 18:32:20 PDT
v.
Comment 8 Bill Mason 2004-12-09 06:26:57 PST
*** Bug 273855 has been marked as a duplicate of this bug. ***
Comment 9 José Jeria 2005-10-28 10:46:44 PDT
*** Bug 314220 has been marked as a duplicate of this bug. ***
Comment 10 Elmar Ludwig 2006-01-10 03:49:47 PST
*** Bug 322892 has been marked as a duplicate of this bug. ***
Comment 11 Jesse Ruderman 2007-02-07 20:14:41 PST
*** Bug 369609 has been marked as a duplicate of this bug. ***
Comment 12 Jesse Ruderman 2007-02-07 20:15:28 PST
*** Bug 203398 has been marked as a duplicate of this bug. ***
Comment 13 Jesse Ruderman 2007-02-07 20:17:21 PST
*** Bug 181996 has been marked as a duplicate of this bug. ***
Comment 14 Jesse Ruderman 2007-02-07 20:22:05 PST
*** Bug 268477 has been marked as a duplicate of this bug. ***
Comment 15 Jesse Ruderman 2007-02-07 20:27:20 PST
*** Bug 281074 has been marked as a duplicate of this bug. ***
Comment 16 Jesse Ruderman 2007-02-07 20:27:56 PST
*** Bug 193634 has been marked as a duplicate of this bug. ***
Comment 17 Jesse Ruderman 2007-02-20 15:57:01 PST
*** Bug 339787 has been marked as a duplicate of this bug. ***
Comment 18 Robert Longson 2007-03-21 07:42:30 PDT
*** Bug 374758 has been marked as a duplicate of this bug. ***
Comment 19 Phil Ringnalda (:philor, back in August) 2007-05-20 22:02:12 PDT
*** Bug 381390 has been marked as a duplicate of this bug. ***
Comment 20 Phil Ringnalda (:philor, back in August) 2007-07-08 17:35:45 PDT
*** Bug 387349 has been marked as a duplicate of this bug. ***
Comment 21 Mats Palmgren (vacation) 2007-09-25 07:41:34 PDT
*** Bug 397346 has been marked as a duplicate of this bug. ***
Comment 22 Elmar Ludwig 2007-10-20 12:20:44 PDT
*** Bug 400280 has been marked as a duplicate of this bug. ***
Comment 23 Dave Townsend [:mossop] 2007-11-22 04:22:07 PST
*** Bug 404954 has been marked as a duplicate of this bug. ***
Comment 24 Jesse Ruderman 2007-12-15 22:34:36 PST
*** Bug 408528 has been marked as a duplicate of this bug. ***
Comment 25 Phil Ringnalda (:philor, back in August) 2007-12-20 08:53:48 PST
*** Bug 409218 has been marked as a duplicate of this bug. ***
Comment 26 Kevin Brosnan 2007-12-30 22:34:30 PST
*** Bug 410303 has been marked as a duplicate of this bug. ***
Comment 27 dampjam 2007-12-31 05:18:16 PST
According to the spec you should be content sniffing for the doctype/xmlns tags if it is html/plain...

I have both set and my bug symptoms are still being exhibited... please see closing img tags post html-render as well as closing anchor tags with a /
Comment 28 Boris Zbarsky [:bz] 2007-12-31 09:04:12 PST
According to the XHTML 1.0 spec, XHTML may be sent as text/html only if it complies with Appendix C of the XHTML specification.  Any document that uses "<textarea/>" does not comply with Appendix C.
Comment 29 dampjam 2007-12-31 11:16:39 PST
but <textarea /> is as well as <img src="blah.jpg" alt="blah blah" /> is... Appendix C specifically specifies that if you include a space before the trailing / you may minimize tags (and are forced to for img tags).

Thus, firefox removing the trailing / in post-render is in violation of the entire XHTML 1.0 spec.
Comment 30 Boris Zbarsky [:bz] 2007-12-31 14:15:33 PST
> but <textarea /> is

No, because per appendix C you may not minimize tags that don't have an empty content model.

The <img> case is indeed per appendix C, and we handle it per the spec.  I'm really not sure what problem you're having with <img> and why you think it's a Gecko bug.  The issue described in bug 410303 seems to be a bug in the validator...
Comment 31 Jesse Ruderman 2008-01-31 15:21:53 PST
*** Bug 415153 has been marked as a duplicate of this bug. ***
Comment 32 Jeremy Baron 2008-02-07 11:17:35 PST
*** Bug 416176 has been marked as a duplicate of this bug. ***
Comment 33 Jesse Ruderman 2008-02-27 12:19:05 PST
*** Bug 419838 has been marked as a duplicate of this bug. ***
Comment 34 Jesse Ruderman 2008-02-27 12:20:00 PST
*** Bug 419833 has been marked as a duplicate of this bug. ***
Comment 35 Josh Birnbaum 2008-03-08 00:26:27 PST
*** Bug 420728 has been marked as a duplicate of this bug. ***
Comment 36 Elmar Ludwig 2008-06-22 16:30:20 PDT
*** Bug 441144 has been marked as a duplicate of this bug. ***
Comment 37 Jesse Ruderman 2008-09-18 13:16:21 PDT
*** Bug 455831 has been marked as a duplicate of this bug. ***
Comment 38 Jesse Ruderman 2008-10-05 14:03:19 PDT
*** Bug 458596 has been marked as a duplicate of this bug. ***
Comment 39 Daniel.S 2008-12-31 05:37:15 PST
*** Bug 434651 has been marked as a duplicate of this bug. ***
Comment 40 Kevin Brosnan 2009-04-03 09:09:53 PDT
*** Bug 486695 has been marked as a duplicate of this bug. ***
Comment 41 Robert Longson 2009-05-27 11:48:28 PDT
*** Bug 495054 has been marked as a duplicate of this bug. ***
Comment 42 Mardeg 2009-06-18 20:58:36 PDT
*** Bug 499246 has been marked as a duplicate of this bug. ***
Comment 43 Robert Longson 2009-07-06 04:32:29 PDT
*** Bug 502581 has been marked as a duplicate of this bug. ***
Comment 44 Robert Longson 2009-07-15 14:29:42 PDT
*** Bug 504391 has been marked as a duplicate of this bug. ***
Comment 45 Kevin Brosnan 2009-07-17 07:18:07 PDT
*** Bug 504799 has been marked as a duplicate of this bug. ***
Comment 46 Manu 2009-07-17 08:20:16 PDT
This bug has been here since 2002, can anyone solve it? It's not that big, but can be annoying...
Comment 47 Dão Gottwald [:dao] 2009-07-17 09:16:40 PDT
The reported behavior is not a bug.
Comment 48 Masatoshi Kimura [:emk] 2009-08-02 17:48:58 PDT
*** Bug 507944 has been marked as a duplicate of this bug. ***
Comment 49 Jesse Ruderman 2010-10-29 09:06:08 PDT
*** Bug 532058 has been marked as a duplicate of this bug. ***
Comment 50 :Ms2ger 2011-02-26 12:02:18 PST
*** Bug 637033 has been marked as a duplicate of this bug. ***
Comment 51 j.j. 2011-05-26 17:37:41 PDT
*** Bug 660108 has been marked as a duplicate of this bug. ***
Comment 52 j.j. 2011-08-23 18:48:57 PDT
*** Bug 681395 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.