<?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>13522</bug_id>
          
          <creation_ts>2007-04-27 06:37:31 -0700</creation_ts>
          <short_desc>Saving a webarchive with a &lt;script&gt;&lt;noscript&gt; will render images in both when opened again</short_desc>
          <delta_ts>2012-05-17 10:41:28 -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>WebKit Misc.</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Rowe (bdash)">mrowe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>mitz</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11937</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-04-27 06:37:31 -0700</bug_when>
    <thetext>28/04/07 1:21 AM Sky Huvard:
Summary: 
Saving a webarchive with a &lt;script&gt;&lt;noscript&gt; will render images in both when opened again.

Steps to Reproduce: 
Save a web archive with a &lt;script&gt;&lt;img&gt;&lt;/script&gt;&lt;noscript&gt;&lt;img (same)&gt;&lt;/noscript&gt;
Open the web archive and see both references to the image being rendered, the noscript one and the script one.

Expected Results: 
Only one should be rendered

Actual Results: 
Both are rendered

&lt;rdar://problem/5166344&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11938</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-04-27 06:38:45 -0700</bug_when>
    <thetext>Reporter confirmed via IRC that he has seen this with the latest nightly build (r21143) and in the released version of WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11951</commentid>
    <comment_count>2</comment_count>
      <attachid>14230</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-27 10:19:55 -0700</bug_when>
    <thetext>Created attachment 14230
Test case

An &lt;img&gt; tag within &lt;script&gt;&lt;/script&gt; tags is not even valid, and content within &lt;noscript&gt;&lt;/noscript&gt; tags should only appear if JavaScript is turned off.

Thus the webarchive should show zero images (assuming JavaScript is on), as the test case does when loaded.

Hixie&apos;s live dom viewer is handy in this situation as well:  http://software.hixie.ch/utilities/js/live-dom-viewer/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11952</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-27 10:23:32 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Created an attachment (id=14230) [edit]
&gt; Test case

When I save a .webarchive of this test page, then view the source after opening it with Safari, I see the following HTML:

&lt;html&gt;&lt;script&gt;
&lt;img src=&quot;http://webkit.org/images/icon-gold.png&quot;&gt;
&lt;/script&gt;&lt;body&gt;&lt;noscript&gt;&lt;/noscript&gt;
&lt;/body&gt;&lt;/html&gt;

Admittedly, the content in the &lt;noscript&gt;&lt;/noscript&gt; is NOT getting saved (and should be), but I can&apos;t reproduce the behavior the reporter is talking about.

I also saved the webarchive and loaded the webarchive using a local debug build of WebKit r21145 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).  I haven&apos;t tried creating a webarchive with shippng Safari.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11954</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-27 10:27:13 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I haven&apos;t tried creating a webarchive with shippng Safari.

Shipping Safari doesn&apos;t even save the &lt;noscript&gt;&lt;/noscript&gt; tags in its webarchive:

&lt;HTML&gt;&lt;SCRIPT&gt;
&lt;img src=&quot;http://webkit.org/images/icon-gold.png&quot;&gt;
&lt;/SCRIPT&gt;&lt;BODY&gt;&lt;/BODY&gt;&lt;/HTML&gt;

Need more information (good test case) to reproduce the issue.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>266997</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-19 15:15:13 -0700</bug_when>
    <thetext>The source of the WebArchive on trunk is as follows:

&lt;html&gt;&lt;head&gt;&lt;script&gt;
&lt;img src=&quot;http://webkit.org/images/icon-gold.png&quot;&gt;
&lt;/script&gt;
&lt;noscript&gt;
&amp;lt;img src=&quot;http://webkit.org/images/icon-gold.png&quot;&amp;gt;
&lt;/noscript&gt;
&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;

The entification of the contents of &lt;noscript&gt; seems wrong, but the description in Comment #0 no longer seems to be happening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>626663</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-05-17 10:02:18 -0700</bug_when>
    <thetext>This sounds much like bug 80170.

Related Radar issues for Apple engineers: &lt;rdar://problem/10972577&gt;, &lt;rdar://problem/10758026&gt;.

&gt; The entification of the contents of &lt;noscript&gt; seems wrong

I had a brief look at this a while ago. WebKit doesn&apos;t match HTML5, but the spec also seemed wrong in some respects. Anyway, we think that WebArchives are a special case, as they don&apos;t have to follow HTML serialization rules.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>626700</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-05-17 10:41:28 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; This sounds much like bug 80170.
&gt; 
&gt; Related Radar issues for Apple engineers: &lt;rdar://problem/10972577&gt;, &lt;rdar://problem/10758026&gt;.
&gt; 
&gt; &gt; The entification of the contents of &lt;noscript&gt; seems wrong
&gt; 
&gt; I had a brief look at this a while ago. WebKit doesn&apos;t match HTML5, but the spec also seemed wrong in some respects. Anyway, we think that WebArchives are a special case, as they don&apos;t have to follow HTML serialization rules.

In deed.

I even have a patch locally that simply and effectively does the right entification of noscript elements when serializing to a WebArchive, but that resulted in more of our favorite &quot;double content when loading the archive&quot; bug, which is why we went with stripping out noscripts altogether.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14230</attachid>
            <date>2007-04-27 10:19:55 -0700</date>
            <delta_ts>2007-04-27 10:19:55 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>bug-13522-test.html</filename>
            <type>text/html</type>
            <size>144</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KPGltZyBzcmM9Imh0dHA6Ly93ZWJraXQub3JnL2ltYWdlcy9pY29uLWdvbGQucG5n
Ij4KPC9zY3JpcHQ+Cjxub3NjcmlwdD4KPGltZyBzcmM9Imh0dHA6Ly93ZWJraXQub3JnL2ltYWdl
cy9pY29uLWdvbGQucG5nIj4KPC9ub3NjcmlwdD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>