<?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>12398</bug_id>
          
          <creation_ts>2011-03-30 00:52:49 +0000</creation_ts>
          <short_desc>Tokenizer stuck in ScriptDataDoubleEscapedState</short_desc>
          <delta_ts>2011-08-04 05:34:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Gentilcore">tonyg</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>gregsimon</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>w3c</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47038</commentid>
    <comment_count>0</comment_count>
      <attachid>972</attachid>
    <who name="Tony Gentilcore">tonyg</who>
    <bug_when>2011-03-30 00:52:49 +0000</bug_when>
    <thetext>Created attachment 972
Testcase

The attached test case gets stuck in ScriptDataDoubleEscapedState which seems incorrect.

IE7-9: PASS
SF5: PASS
OP11: PASS
FF3.6: PASS
FF4: FAIL
CR10-12: FAIL

Filed in WebKit as https://bugs.webkit.org/show_bug.cgi?id=57407</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47039</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-03-30 01:00:20 +0000</bug_when>
    <thetext>Note: This bug affects Bugzilla, so be careful copy/pasting the string around in this page or you might hose the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47041</commentid>
    <comment_count>2</comment_count>
    <who name="Tony Gentilcore">tonyg</who>
    <bug_when>2011-03-30 01:24:37 +0000</bug_when>
    <thetext>Actually the title of this bug is misleading, the &quot;&lt;/script&gt;&quot; gets us out of ScriptDataDoubleEscapedState and back into ScriptDataEscapedState. I&apos;m still looking into it, but maybe the bug is that we shouldn&apos;t go into ScriptDataDoubleEscapedState in the first place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47045</commentid>
    <comment_count>3</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-03-30 06:17:07 +0000</bug_when>
    <thetext>It&apos;s known that there exists some sites on the Web where the spec gets stuck inside a script. That&apos;s the price of never reparsing.

Is this breaking a top site that you have been unable to evangelize?

With Firefox, the script states have been a wild success beyond my expectations. Exactly one case of site breakage has reached me on b.m.o and that site was successfully evangelized.

With the data presented so far, I&apos;d WONTFIX this.

To the extent this affects Bugzilla itself, it&apos;s a bug in Bugzilla, although I thought the bug was already fixed in upstream Bugzilla. In general, any Web app that includes untrusted strings as string literals in inline scripts MUST escape &lt; as \u003C to be safe. (That&apos;s the simplest way to deal with &lt;!--, &lt;script&gt; and &lt;/script&gt; all in one go.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47046</commentid>
    <comment_count>4</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-03-30 06:19:38 +0000</bug_when>
    <thetext>Also note that you&apos;ll never get all possible cases &quot;right&quot; without including JavaScript and VBScript parsers as part of the HTML tokenizer, so it&apos;s kinda useless to be able to point to one more case that &quot;fails&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47047</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-03-30 06:43:26 +0000</bug_when>
    <thetext>Tony probably knows more of the details, but my understanding is that this issue manifests itself in one of Google&apos;s web site.  We can certainly ask those folks if they&apos;d be willing to work around the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47049</commentid>
    <comment_count>6</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-03-30 09:41:30 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Tony probably knows more of the details, but my understanding is that this
&gt; issue manifests itself in one of Google&apos;s web site.  We can certainly ask those
&gt; folks if they&apos;d be willing to work around the issue.

In that case, I think this should be WONTFIX+evang.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47050</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-03-30 10:03:42 +0000</bug_when>
    <thetext>I agree that this should be WONTFIX. The current spec is as web compatible as it gets without doing reparsing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47057</commentid>
    <comment_count>8</comment_count>
    <who name="Tony Gentilcore">tonyg</who>
    <bug_when>2011-03-30 16:21:31 +0000</bug_when>
    <thetext>Thanks for the explanations. I&apos;ve mentioned your escaping suggestion to the webmaster. Does anyone have a bugzilla contact to do the same?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47068</commentid>
    <comment_count>9</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-03-31 05:44:38 +0000</bug_when>
    <thetext>I believe the Bugzilla bug was
https://bugzilla.mozilla.org/show_bug.cgi?id=503980

Is there still another bug of that nature in Bugzilla itself?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49451</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-10 22:24:59 +0000</bug_when>
    <thetext>Note that a Web page that runs into this will be invalid, so authors can avoid this problem by using the validator to check their pages.

EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: per comments above</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53888</commentid>
    <comment_count>11</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:34:11 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>972</attachid>
            <date>2011-03-30 00:52:49 +0000</date>
            <delta_ts>2011-03-30 00:52:49 +0000</delta_ts>
            <desc>Testcase</desc>
            <filename>comment.html</filename>
            <type>text/html</type>
            <size>333</size>
            <attacher name="Tony Gentilcore">tonyg</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjwhLS0gc2F2ZWQgZnJvbSB1cmw9KDAwNDYpaHR0cDovL3d3dy5jb3Jw
Lmdvb2dsZS5jb20vfnRvbnlnL2NvbW1lbnQuaHRtbCAtLT4KPGh0bWw+PGhlYWQ+PG1ldGEgaHR0
cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9SVNPLTg4
NTktMSI+PC9oZWFkPjxib2R5PjxkaXYgaWQ9Im91dHB1dCI+RkFJTDwvZGl2Pgo8c2NyaXB0PnZh
ciBhID0gIjwhLS08c2NyaXB0ICI7ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ291dHB1dCcpLmlu
bmVySFRNTD0nUEFTUyc7PC9zY3JpcHQ+Cjwvc2NyaXB0PjwvYm9keT48L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>