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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>3501</bug_id>
          
          <creation_ts>2005-06-13 06:43:55 -0700</creation_ts>
          <short_desc>HTMLScriptElement.text returns empty value</short_desc>
          <delta_ts>2005-06-19 23:10:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>312.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.3</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>3526</dup_id>
          
          <bug_file_loc>http://www.declarativa.pt/script.htm</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="Mário Araújo">mfa</reporter>
          <assigned_to name="Dave Hyatt">hyatt</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11720</commentid>
    <comment_count>0</comment_count>
    <who name="Mário Araújo">mfa</who>
    <bug_when>2005-06-13 06:43:55 -0700</bug_when>
    <thetext>The text property (the script content of the element) of the HTMLScriptElement 
(http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-81598695) 
returns an empty value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11879</commentid>
    <comment_count>1</comment_count>
      <attachid>2330</attachid>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-14 07:06:41 -0700</bug_when>
    <thetext>Created attachment 2330
Possible solution (tested and found working by Joost de Valk)

The following patch is taken straight from KHTML, which is not affected
by this bug. Instead of look at the TEXT attribute, the text is now 
extracted from the TEXT child.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11880</commentid>
    <comment_count>2</comment_count>
      <attachid>2330</attachid>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-06-14 07:19:03 -0700</bug_when>
    <thetext>Comment on attachment 2330
Possible solution (tested and found working by Joost de Valk)

This doesn&apos;t handle the case where the &lt;script&gt; contains multiple text nodes,
or text nodes and cdata nodes, or text nodes and cdata nodes and comment nodes
and element nodes and entity nodes.

It should probably be a little cleverer. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11887</commentid>
    <comment_count>3</comment_count>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-14 09:09:57 -0700</bug_when>
    <thetext>Konqueror handles the following testcases just fine: CDATA, 
multiple nodes and mixed nodes types.

http://www.rakaz.nl/projects/safari/showscripts.html

Did you come to your conclusion after testing the patch, or
just from looking at the patch?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11888</commentid>
    <comment_count>4</comment_count>
      <attachid>2332</attachid>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-14 09:13:16 -0700</bug_when>
    <thetext>Created attachment 2332
Extended testcase

This test case will also test for multiple nodes and mixed node types.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12072</commentid>
    <comment_count>5</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2005-06-14 23:43:48 -0700</bug_when>
    <thetext>At this time the patches won&apos;t build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12080</commentid>
    <comment_count>6</comment_count>
      <attachid>2330</attachid>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2005-06-15 00:33:23 -0700</bug_when>
    <thetext>Comment on attachment 2330
Possible solution (tested and found working by Joost de Valk)

JdV: works for me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12092</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-06-15 02:42:16 -0700</bug_when>
    <thetext>Those two testcases are sent as text/html and therefore do not test the XML case
that I was referring to. (There are no comments or CDATA blocks in those
testcases, since they are parsed as HTML, in which the parser treats the entire
&lt;script&gt; element as having a single CDATA block.)

I&apos;ll change the testcase attached to this bug to have the right MIME type. Test
it again and you should see that it in fact doesn&apos;t work.

When running that test as XML you should see, for the .text attribute of each
&lt;script&gt; element in the file:

1. Two blank lines for the first &lt;script&gt; block (&quot;\n\n&quot;). (And indeed the entire
   test won&apos;t run when you send it as XML since the script that runs the test is 
   commented out.)
2. Two blank lines for the second &lt;script&gt; block.
3. The following for the third: &quot;\n\nfunction noname2(){\n\t/*script*/\n\n}\n&quot;
4. For the fourth: &quot;\nfunction noname3(){\n\t/*script*/\n}\n&quot;
5. Then: &quot;\n\n\n&quot;
6. The sixth is the following two strings concatenated (I couldn&apos;t fit them
   on one line here):
      &quot;\n\nfunction noname5a(){\n\t/*script*/\n}\n&quot; 
      &quot;\n\nfunction noname5b(){\n\t/*script*/\n}\n&quot;
7. And finally: &quot;\n\n\nfunction noname6b(){\n\t/*script*/\n}\n\n&quot;

...where of course &quot;\t&quot; is a tab character and &quot;\n&quot; is a newline character.

Also note that &quot;document.getElementsByTagName(&quot;SCRIPT&quot;);&quot; shouldn&apos;t work in
XHTML, you&apos;ll have to do this instead: 
   document.getElementsByTagNameNS(&quot;http://www.w3.org/1999/xhtml&quot;, &quot;script&quot;)
Namely, you have to use lowercase and you have to use the *NS variant and give
the namespace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12111</commentid>
    <comment_count>8</comment_count>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-15 05:59:57 -0700</bug_when>
    <thetext>I&apos;ve replaced the text() function with the following snippet() and it seems to
work, with one exception:

&lt;script&gt;
&lt;[CDATA[

   ...

]]&gt;
&lt;/script&gt;

The newline between &lt;script&gt; and &lt;[CDATA[ is not included. Neither is the
newline between ]]&gt; and &lt;/script&gt;. Those newlines should be of node type
TEXT_NODE, so the most probably cause is that they are stripped elsewhere,
because they only contain whitespace.


DOMString HTMLScriptElementImpl::text() const
{
    if (firstChild()) {
        QString scriptCode = &quot;&quot;;
        NodeImpl *child;

        for (child = firstChild(); child; child = child-&gt;nextSibling()) {
            if (child-&gt;nodeType() == Node::TEXT_NODE || child-&gt;nodeType() ==
Node::CDATA_SECTION_NODE) {
                scriptCode += child-&gt;nodeValue().string();
            }
        }
        return scriptCode;
    }
    return &quot;&quot;;
}

I still need to look at the other function. Replacing the text also becomes more
complicated, because we may need to replace multiple nodes with a single text
node...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12143</commentid>
    <comment_count>9</comment_count>
      <attachid>2368</attachid>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-15 11:36:34 -0700</bug_when>
    <thetext>Created attachment 2368
XHTML and HTML compatible patch

A modified patch that is compatible with both documents that are parsed by the
XML parser and documents parsed by the HTML parser.

XML behavoir is tested with:
http://www.rakaz.nl/projects/safari/showscripts.php

HTML behavoir is tested with:
http://www.rakaz.nl/projects/safari/showscripts.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12222</commentid>
    <comment_count>10</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2005-06-16 01:36:23 -0700</bug_when>
    <thetext>Looks like the fix I did for 3256 fixes this as well (except for changing HTMLScriptElement::text() and 
setText() to call the implementation)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12610</commentid>
    <comment_count>11</comment_count>
    <who name="Niels Leenheer (HTML5test)">info</who>
    <bug_when>2005-06-19 14:30:52 -0700</bug_when>
    <thetext>This bug can be closed, the fix suggested in this bug is incorporated into the
patch for bug 3526.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12635</commentid>
    <comment_count>12</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2005-06-19 23:10:21 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 3526 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2330</attachid>
            <date>2005-06-14 07:06:41 -0700</date>
            <delta_ts>2005-06-15 11:36:34 -0700</delta_ts>
            <desc>Possible solution (tested and found working by Joost de Valk)</desc>
            <filename>khtml.patch</filename>
            <type>text/plain</type>
            <size>1889</size>
            <attacher name="Niels Leenheer (HTML5test)">info</attacher>
            
              <data encoding="base64">SW5kZXg6IGtodG1sL2RvbS9odG1sX2hlYWQuY3BwDQo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2
cy9yb290L1dlYkNvcmUva2h0bWwvZG9tL2h0bWxfaGVhZC5jcHAsdg0KcmV0cmlldmluZyByZXZp
c2lvbiAxLjgNCmRpZmYgLXUgLXIxLjggaHRtbF9oZWFkLmNwcA0KLS0tIGh0bWxfaGVhZC5jcHAJ
MjAwMy8xMS8wMyAwNjozMjowNAkxLjgNCisrKyBodG1sX2hlYWQuY3BwCTIwMDUvMDYvMTQgMTM6
NTU6NTQNCkBAIC0zMjksMTIgKzMyOSwxMiBAQA0KIERPTVN0cmluZyBIVE1MU2NyaXB0RWxlbWVu
dDo6dGV4dCgpIGNvbnN0DQogew0KICAgICBpZighaW1wbCkgcmV0dXJuIERPTVN0cmluZygpOw0K
LSAgICByZXR1cm4gKChFbGVtZW50SW1wbCAqKWltcGwpLT5nZXRBdHRyaWJ1dGUoQVRUUl9URVhU
KTsNCisgICAgcmV0dXJuICgoSFRNTFNjcmlwdEVsZW1lbnRJbXBsICopaW1wbCktPnRleHQoKTsN
CiB9DQogDQogdm9pZCBIVE1MU2NyaXB0RWxlbWVudDo6c2V0VGV4dCggY29uc3QgRE9NU3RyaW5n
ICZ2YWx1ZSApDQ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9NU3RyaW5nICZ2YWx1ZSkNCiB7DQotICAg
IHNldEF0dHJpYnV0ZShBVFRSX1RFWFQsIHZhbHVlKTsNCisgICAgaW50IGV4Y2VwdGlvbmNvZGUg
PSAwOw0KKyAgICBpZiAoZmlyc3RDaGlsZCgpICYmIGZpcnN0Q2hpbGQoKS0+bm9kZVR5cGUoKSA9
PSBOb2RlOjpURVhUX05PREUpIHsNCisgICAgICAgIHN0YXRpY19jYXN0PERPTTo6VGV4dEltcGwg
Kj4oZmlyc3RDaGlsZCgpKS0+c2V0RGF0YShzdHIsIGV4Y2VwdGlvbmNvZGUpOw0KKyAgICAgICAg
cmV0dXJuOw0KKyAgICB9DQorICAgIC8vIE5vIGNoaWxkIHRleHQgbm9kZSBmb3VuZCwgY3JlYXRp
bmcgb25lDQorICAgIERPTTo6VGV4dEltcGwqIHQgPSBnZXREb2N1bWVudCgpLT5jcmVhdGVUZXh0
Tm9kZShzdHIuaW1wbGVtZW50YXRpb24oKSk7DQorICAgIGFwcGVuZENoaWxkKHQsIGV4Y2VwdGlv
bmNvZGUpOw0KIH0NCiANCiBET01TdHJpbmcgSFRNTFNjcmlwdEVsZW1lbnRJbXBsOjpodG1sRm9y
KCkgY29uc3Q=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2332</attachid>
            <date>2005-06-14 09:13:16 -0700</date>
            <delta_ts>2005-06-15 02:43:41 -0700</delta_ts>
            <desc>Extended testcase</desc>
            <filename>showscripts.html</filename>
            <type>application/xhtml+xml</type>
            <size>1231</size>
            <attacher name="Niels Leenheer (HTML5test)">info</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh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QVsNCmZ1bmN0aW9u
IG5vbmFtZTVhKCl7DQoJLypzY3JpcHQqLw0KfQ0KXV0+DQo8IVtDREFUQVsNCmZ1bmN0aW9uIG5v
bmFtZTViKCl7DQoJLypzY3JpcHQqLw0KfQ0KXV0+DQo8L3NjcmlwdD4NCjxzY3JpcHQgdHlwZT0i
dGV4dC9qYXZhc2NyaXB0Ij4NCjwhLS0NCmZ1bmN0aW9uIG5vbmFtZTZhKCl7DQoJLypzY3JpcHQq
Lw0KfQ0KLy8tLT4NCjwhW0NEQVRBWw0KZnVuY3Rpb24gbm9uYW1lNmIoKXsNCgkvKnNjcmlwdCov
DQp9DQpdXT4NCjwvc2NyaXB0Pg0KDQo8L2hlYWQ+DQo8Ym9keSBvbmxvYWQ9ImphdmFzY3JpcHQ6
c2hvd1NjcmlwdHMoKTsiPg0KPC9ib2R5Pg0KPC9odG1sPg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2368</attachid>
            <date>2005-06-15 11:36:34 -0700</date>
            <delta_ts>2005-06-15 11:36:34 -0700</delta_ts>
            <desc>XHTML and HTML compatible patch</desc>
            <filename>khtml.patch</filename>
            <type>text/plain</type>
            <size>2224</size>
            <attacher name="Niels Leenheer (HTML5test)">info</attacher>
            
              <data encoding="base64">SW5kZXg6IGtodG1sL2RvbS9odG1sX2hlYWQuY3BwDQo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2
cy9yb290L1dlYkNvcmUva2h0bWwvZG9tL2h0bWxfaGVhZC5jcHAsdg0KcmV0cmlldmluZyByZXZp
c2lvbiAxLjgNCmRpZmYgLXUgLXIxLjggaHRtbF9oZWFkLmNwcA0KLS0tIGh0bWxfaGVhZC5jcHAJ
MjAwMy8xMS8wMyAwNjozMjowNAkxLjgNCisrKyBodG1sX2hlYWQuY3BwCTIwMDUvMDYvMTQgMT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oaWxkKCkpLT5zZXREYXRhKHZh
bHVlLCBleGNlcHRpb25jb2RlKTsNCisgICAgICAgIHJldHVybjsNCisgICAgfQ0KKw0KKyAgICBp
ZiAobnVtID4gMCkgew0KKyAgICAgICAgcmVtb3ZlQ2hpbGRyZW4oKTsNCisgICAgfQ0KKw0KKyAg
ICBET006OlRleHRJbXBsKiB0ID0gZ2V0RG9jdW1lbnQoKS0+Y3JlYXRlVGV4dE5vZGUodmFsdWUu
aW1wbGVtZW50YXRpb24oKSk7DQorICAgIGFwcGVuZENoaWxkKHQsIGV4Y2VwdGlvbmNvZGUpOw0K
IH0NCiANCiBET01TdHJpbmcgSFRNTFNjcmlwdEVsZW1lbnRJbXBsOjpodG1sRm9yKCkgY29uc3QN
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>