Closed Bug 286083 Opened 20 years ago Closed 20 years ago

empty textarea tag puts all following (x)html in textarea

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 263012

People

(Reporter: matthijs.wensveen, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1

when a document contains an empty textarea tag, like this:
<textarea />

the rest of the document after the textarea tag is showed as the content of the
textarea, even though the document is valid xml.

Reproducible: Always

Steps to Reproduce:
1. Open a document conaining an empty textarea tag (i.e. attached html)
2.
3.

Actual Results:  
The html or xhtml of the document after the textarea is shown as the content of
the textarea

Expected Results:  
show a valid document with an empty textarea
The empty syntax only exists in XML (and thus XHTML). You need to serve your page as an XML 
document and not as an HTML (tag soup) document.

*** This bug has been marked as a duplicate of 263012 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Okay, I agree, but how do I go about serving xhtml documents as xml. Set the
content-type to text/xml makes firefox render it as an xml document if there is
no stylesheet attached to it. So content-type has to be text/html for xhtml
documents.

I've attached a valid xhtml document where this still happens.
Attachment #177379 - Attachment mime type: text/html → application/xhtml+xml
I can't reproduce that behavior with a recent nightly build. Loading attachment
177379 [details] results in an empty textarea followed by a submit button.

You shouldn't need to set the content-type to text/html, just having a proper
namespace should be enough.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: