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

improper handling for HTML special characters '<', '>', and '&'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.1.7, 1.2.0
    • tools
    • generic, sparc
    • generic, solaris_2.5.1

      Every class's documentation has the section "Methods inherited from class
      java.lang.Object". This section starts with ", " -- why? Because the first
      entry is "<clinit>". It is a good thing the tag is currently invalid.

      In general, care must be taken by javadoc to ensure the text being generated
      conforms to the character encoding defined in the HTML specification. The
      bug described here is likely a minor symptom of a pervasive problem.

      One may be tempted to tackle to problem of abolishing incorrect HTML from the
      output of javadoc. However, I highly recommend limiting the scope of the
      provoked bug fix to producing correct HTML from non-HTML string data.


      Name: dbT83986 Date: 04/08/99


      If you run javadoc with the "-private" option on a class that
      contains a static initializer, it tries to generate documentation
      for the compiler-generated method called "<clinit>". The HTML
      looks like this:

      <a name="<clinit>()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
      <a name="<clinit>"><b><clinit></b></a>

      and browsers get mad at the unescaped greater-than signs.
      At least NS and IE do.
      ======================================================================

            gafter Neal Gafter (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: