Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4313255

HTMLConverter doesn't handle HTML comments correctly

XMLWordPrintable

    • hopper
    • x86
    • linux



      Name: rlT66838 Date: 02/16/2000


      This is a duplicate of Bug Id: 4190162
      However this is not documented.


      java version "1.2.2-RC2"
      Classic VM (build 1.2.2-RC2-K, green threads, javacomp)


      Plug-in HTML Converter version 1.2 doesn't handle comments correctly.

      ----------------------------------------------------------------------
      MyApplet.java:

      <pre>
      public class MyApplet
          extends java.applet.Applet {

          public void init () {
      System.out.println (MyApplet.class + " myParam=" + getParameter ("myParam"));
          }
      }
      <pre>


      ----------------------------------------------------------------------
      MyAppletWithParamComments.html:

      <pre>

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html>
        <head>
          <title>Applet Test</title>
        </head>

        <body">
          <h1>Applet Test</h1>
          <applet code="MyApplet" width="100" height="100">
            <param name="myParam" value="myValue0">
      <!-- <param name="myParam" value="myValue1"> -->
      <!-- <param name="myParam" value="myValue2"> -->
            Your browser doesn't run applets.
          </applet>
        </body>
      </html>

      <pre>

      ----------------------------------------------------------------------
      Netscape 4.7 with Java 1.1.5 correctly prints the following text on the console:

      class MyApplet myParam=myValue0

      ----------------------------------------------------------------------
      MyAppletWithParamComments-plugin-1.2.html (generated by HTMLCOnverter 1.2):

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <html>
        <head>
          <title>Applet Test</title>
        </head>

        <body">
          <h1>Applet Test</h1>
          <!--"CONVERTED_APPLET"-->
      <!-- CONVERTER VERSION 1.0 -->
      <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      WIDTH = "100" HEIGHT = "100"
      codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
      <PARAM NAME = CODE VALUE = "MyApplet" >

      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
      <PARAM NAME = "myParam" VALUE ="myValue0">
      <PARAM NAME = "myParam" VALUE ="myValue1">
      <PARAM NAME = "myParam" VALUE ="myValue2">
      <COMMENT>
      <EMBED type="application/x-java-applet;version=1.2" java_CODE = "MyApplet" WIDTH
      = "100" HEIGHT = "100" myParam = "myValue0" myParam = "myValue1" myParam =
      "myValue2"
      pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED></COMMENT>
      <!-- -->
      <!-- -->
            Your browser doesn't run applets.
      </NOEMBED></EMBED>
      </OBJECT>

      <!--
      <APPLET CODE = "MyApplet" WIDTH = "100" HEIGHT = "100" >
      <PARAM NAME = "myParam" VALUE ="myValue0">
      <PARAM NAME = "myParam" VALUE ="myValue1">
      <PARAM NAME = "myParam" VALUE ="myValue2">
      <!-- -->
      <!-- -->
            Your browser doesn't run applets.

      </APPLET>
      -->
      <!--"END_CONVERTED_APPLET"-->

        </body>
      </html>

      ----------------------------------------------------------------------
      This results in 2 bugs:

        1) extra text "Your browser doesn't run applets. -->" on HTML page
        2) text "class MyApplet myParam=myValue2" on Plugin console
      (Review ID: 100779)
      ======================================================================

            xlu Xiaobin Lu (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: