<?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>9111</bug_id>
          
          <creation_ts>2010-02-21 23:56:01 +0000</creation_ts>
          <short_desc>Amaya doesn&apos;t handle applet tags properly</short_desc>
          <delta_ts>2010-02-23 15:56:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Amaya</product>
          <component>Misc</component>
          <version>11.3.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://lists.w3.org/Archives/Public/www-amaya/2010JanMar/0092.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Helder Magalh">helder.magalhaes</reporter>
          <assigned_to name="Vatton">Irene.Vatton</assigned_to>
          <cc>carcone</cc>
    
    <cc>emilien.kia</cc>
    
    <cc>fred.wang</cc>
    
    <cc>Irene.Vatton</cc>
    
    <cc>vincent.quint</cc>
          
          <qa_contact name="Vatton">Irene.Vatton</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32492</commentid>
    <comment_count>0</comment_count>
    <who name="Helder Magalh">helder.magalhaes</who>
    <bug_when>2010-02-21 23:56:01 +0000</bug_when>
    <thetext>Amaya seems to be faulty at handling applet elements, either removing and/or changing their order within the document, which leads to breaking the whole document.


Steps to reproduce:
1. Create a new XHTML document;
2. Go to the source view and paste the following snippet into the &quot;body&quot; tag:

&lt;applet height=&quot;100px&quot; width=&quot;100px&quot;&gt;&lt;param name=&quot;foo&quot; value=&quot;bar&quot; /&gt;Fallback content&lt;/applet&gt;
&lt;p&gt;Type something here&lt;/p&gt;

3. Go to WYSIWYG view and type something into the paragraph that follows the applet tag;
4. Change to source view again (or just save the document).


Expected results:
Modifying any content within the page (step 3) would be harmless.


Actual results:
Modifying the paragraph that follows (step 3) and switching to source view (step 4) breaks the applet tag completely:

&lt;param name=&quot;foo&quot; value=&quot;bar&quot; /&gt;
&lt;p&gt;Fallback content 
&lt;p&gt;Type something herex&lt;/p&gt;

This kind of breaking affect the whole document also, which is serious.


Additional information:
The problem seems to be triggered by including the &quot;param&quot; element. A standalone &quot;applet&quot; element is left untouched.

The problem is seen in HTML documents as well, just use the HTML way of closing empty elements.

This was originally reported by Francesco [1], later confirmed/clarified by Chaals [2].

My environment is:
 * Amaya 11.3.1 (Dec 9 2009), VC9 flavor;
 * Windows Vista SP2.


Workarounds:
A potentially plausible workaround can be using other tags [3] to include Java applications: &quot;object&quot; (standard) or &quot;embed&quot; (supported in most browsers). A quick test performed with &quot;object&quot; elements shows that it doesn&apos;t seem to trigger the same behavior.


[1] http://lists.w3.org/Archives/Public/www-amaya/2010JanMar/0056.html
[2] http://lists.w3.org/Archives/Public/www-amaya/2010JanMar/0092.html
[3] http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/using_tags.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32585</commentid>
    <comment_count>1</comment_count>
    <who name="Vincent Quint">vincent.quint</who>
    <bug_when>2010-02-23 15:56:34 +0000</bug_when>
    <thetext>
There are two different cases here :

1 - If the doocument uses the XHTML 1.0 Strict DTD, the &lt;applet&gt; element is simply removed (but its content is preserved) by Amaya: &lt;applet&gt; is not valid for this DTD. The red button in the lower right corner is lit. If you click it, you get an error message explaining the problem.

2 - If the document does not use this DTD (it uses for instance HTML 4.01 or XHTML 1.0 Transitional), then the &lt;applet&gt; element is allowed. But there was a bug in Amaya: the &lt;param&gt; elements included in an &lt;applet&gt; element were moved by the parser outside of the &lt;applet&gt;.
This bug is fixed: the &lt;param&gt; elements stay now within the &lt;applet&gt;.

Vincent.
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>