Closed
Bug 271575
Opened 20 years ago
Closed 20 years ago
Empty <textarea> is not parsed correctly when using XHTML
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: kn, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041124 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041124 Hi, in standard HTML you would write <textarea name="description" cols="80" rows="20"></textarea> to produce an empty textarea. In XHTML you have to use <textarea name="description" cols="80" rows="20"/> . Mozilla doesn't handle this right. It will show the sourcecode following the textarea. Snippets used to test: Not working: <html> <body> <form> <textarea name="description" cols="80" rows="20"/> <h1>blah</h1> </form> </body> </html> Working: <html> <body> <form> <textarea name="description" cols="80" rows="20"></textarea> <h1>blah</h1> </form> </body> </html> (The missing XHTML Header doesn't change anything, so I don't paste it here). Greetings, Klaus Reproducible: Always Steps to Reproduce: 1. Just create two html files of the snippets above and open them. Actual Results: Textarea is not empty! Expected Results: The textarea should be empty :)
Comment 1•20 years ago
|
||
(In reply to comment #0) > In XHTML you have to use <textarea name="description" cols="80" rows="20"/> . > Mozilla doesn't handle this right. It will show the sourcecode following the > textarea. No, you don't have to use that. In fact, you cannot use that unless you are serving the page as an application/xhtml+xml document. Otherwise, the page is parsed as HTML and so HTML syntax rules apply. And that syntax requires a </textarea> closing tag.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 2•20 years ago
|
||
I wrote that the missing header doesn't change anything. You can also try: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <body> <form> <textarea name="description" cols="80" rows="20"/> <h1>blah</h1> </form> </body> </html> BTW: Every other XHTML tag style command (like <br/> <hr/> etc.) is parsed correctly. So why should only the textarea be invalid? Greetings, Klaus
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
| Reporter | ||
Comment 3•20 years ago
|
||
Appearently if you put this content in a .html file it doesn't work but in a .xhtml file it works. The problem arises with CGIs which output xhtml where you can't change an ending. So it looks like the doctype is ignored or something like that.
Comment 4•20 years ago
|
||
(In reply to comment #3) > Appearently if you put this content in a .html file it doesn't work but in a > .xhtml file it works. > > The problem arises with CGIs which output xhtml where you can't change an ending. > > So it looks like the doctype is ignored or something like that. No, it not about the doctype. It works locally with .xhtml files because FF assumes that a .xhtml file is application/xhtml+xml. It will not work on a live server unless the server sends the page that way. This bug is invalid. Do not reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•