<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24799</bug_id>
          
          <creation_ts>2014-02-25 13:08:18 +0000</creation_ts>
          <short_desc>Text-content elements in HTML</short_desc>
          <delta_ts>2014-02-26 21:43:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrea Rendine">master.skywalker.88</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>master.skywalker.88</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101329</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Rendine">master.skywalker.88</who>
    <bug_when>2014-02-25 13:08:18 +0000</bug_when>
    <thetext>The validator does not flag as incorrect markup present inside &lt;title&gt;, &lt;textarea&gt; and presumably other text-content elements in HTML document, as expected by the spec. But it does flag them so in XHTML documents.
Since the presence of markup inside these elements constitutes both a risk and a reason for different DOM trees in documents of either type, please correct it ASAP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101455</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-02-26 21:08:41 +0000</bug_when>
    <thetext>(In reply to Andrea Rendine from comment #0)
&gt; The validator does not flag as incorrect markup present inside &lt;title&gt;,
&gt; &lt;textarea&gt;

That&apos;s because inside those elements in text/html there is no such thing as markup. Any characters that looks like markup within those elements are actually just text.

&gt; and presumably other text-content elements in HTML document, as
&gt; expected by the spec.

No, what&apos;s expected by the spec is that all characters in those elements are handled as text, not as markup.

&gt; But it does flag them so in XHTML documents.

That&apos;s because in XML those characters that look like markup are in fact always markup. So &lt;title&gt; and &lt;textarea&gt; in XML documents can&apos;t contain markup.

&gt; Since the presence of markup inside these elements constitutes both a risk
&gt; and a reason for different DOM trees in documents of either type, please
&gt; correct it ASAP.

No, please read the spec more carefully and take time to actually understand it.

The validator is following the spec here. So it sounds like you don&apos;t like the behavior that the spec requires. Which is to say, you don&apos;t like the way that browsers actually handle the contents of &lt;title&gt; and &lt;textarea&gt; elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101459</commentid>
    <comment_count>2</comment_count>
    <who name="Andrea Rendine">master.skywalker.88</who>
    <bug_when>2014-02-26 21:23:54 +0000</bug_when>
    <thetext>I have read and understood clearly the spec, but thank you for your kind proposal.

Thus said, there is a slight difference in meaning between
[[The HTML parser treats markup inside iframe elements as text.]](iframe)
which EXPLICITLY states the behavior of UAs in regard to an element whose content is considered text no matter what characters are used, and
[[The IDL attribute text must return a concatenation of the contents of all the Text nodes that are children of the title element (ignoring any other nodes such as comments *or elements*), in tree order. On setting, it must act the same way as the textContent IDL attribute.]](title)

If you are right, then tell me what kind of element could ever be inside &lt;title&gt;. Or &lt;textarea&gt;, for what is the matter.
Or the &apos;text&apos; IDL attribute is required to return something different than the actual title of the document (i.e. the one shown in the browser&apos;s window/tab)? First off, the browsers&apos; &apos;text&apos; IDL attribute implementation does not seem to honour the requested behaviour. Or the sentence &quot;Text nodes that are children of the title element (ignoring any other nodes such as comments *or elements*)&quot; is meant to be completed with the sentence &quot;actually everything inside a &lt;title&gt; is text, except for comments (but it is not stated)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101464</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-02-26 21:37:33 +0000</bug_when>
    <thetext>(In reply to Andrea Rendine from comment #2)

&gt; [[The IDL attribute text must return a concatenation of the contents of all
&gt; the Text nodes that are children of the title element (ignoring any other
&gt; nodes such as comments *or elements*), in tree order. On setting, it must
&gt; act the same way as the textContent IDL attribute.]](title)

What possible relevance does that have to the behavior of the validator?

When you give a document to the validator to check, it is impossible for that document to ever have a title element that contains any child elements.

&gt; If you are right, then tell me what kind of element could ever be inside
&gt; &lt;title&gt;. Or &lt;textarea&gt;, for what is the matter.

You filed this bug against the validator. That question has zero relevance to the behavior of the validator. If you&apos;re curious about it, file a bug against the spec or something.

For the purposes of documents you check with the validator, the no elements can ever be a child of &lt;title&gt; or &lt;textarea&gt;.

Again the statement you cite above has absolutely no relevance to the behavior of the validator. So I don&apos;t know why you want to continue a discussion about this here.

&gt; Or the &apos;text&apos; IDL attribute is required to return something different than
&gt; the actual title of the document (i.e. the one shown in the browser&apos;s
&gt; window/tab)? First off, the browsers&apos; &apos;text&apos; IDL attribute implementation
&gt; does not seem to honour the requested behaviour. Or the sentence &quot;Text nodes
&gt; that are children of the title element (ignoring any other nodes such as
&gt; comments *or elements*)&quot; is meant to be completed with the sentence
&gt; &quot;actually everything inside a &lt;title&gt; is text, except for comments (but it
&gt; is not stated)&quot;.

Again, you filed this bug report against the validator. But I&apos;ve told you already there&apos;s no bug in the validator here. So at this point I have no idea what else you expect me to do in response to this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101467</commentid>
    <comment_count>4</comment_count>
    <who name="Andrea Rendine">master.skywalker.88</who>
    <bug_when>2014-02-26 21:43:46 +0000</bug_when>
    <thetext>So there are &quot;elements in &lt;title&gt; for the purpose of IDL&quot; and &quot;elements in &lt;title&gt; for the purpose of validation&quot;. I see. I thought that elements are elements for every purpose. And that elements were not allowed in &lt;title&gt; for any purpose. Got it, I&apos;ll refer to the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>