[Bug 23145] New: Add <textarea> content restrictions for XHTML5

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23145

            Bug ID: 23145
           Summary: Add <textarea> content restrictions for XHTML5
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: PC
               URL: http://www.w3.org/html/wg/drafts/html/master/single-pa
                    ge.html#the-textarea-element
                OS: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: xn--mlform-iua@xn--mlform-iua.no
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

PROPOSAL: 

   For <textarea>, state that that, in XML/XHTML,
   no elements are allowed as children. 

BACKGROUND: 

<textarea> is an "escapable raw text element" (which is the same element type
as the <title> element btw).

Everyting related to "content model: text" as well as "element of kind raw
text" as well as "element of kind escapable raw text", is problematic when it
comes to XHTML.

Seemingly, the spec allows any content for <textarae>. For instance:ยจ

   <textarea><html></textarea>

The above will, in HTML, be interpreted the same as this:

   <textarea>&lt;html></textarea>

But in XML, the firstexample would count as NOT well-formed. And if you do it
the well formed way, like so:

   <textarea><html /></textarea>

then the <html> element will be parsed as an element, and not as text (thus:
difference from how it is parced in HTML).

CONCLUSION:

It is seems like an omission that the spec does not state that elements are not
permitted as child of <textarea>. For contrast, then, for the <iframe> element,
it is specified that it must be empty if used in XHTML. 

http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#iframe-content-model

Thus, XHTML requires different use. And the same goes for <textarea> - which
does not need to be empty, but which does need to have escaped content.

May be you should simply say that it is not required to escape the "<" in HTML,
but that it is required to escapeit in XHTML.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 3 September 2013 23:49:52 UTC