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

HTMLEditorKit.write(...) method incorrectly writes <ol> type attribute.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      sparc
    • OS:
      solaris_2.5.1
    • Verification:
      Verified

      Description



      Name: aaC67449 Date: 04/17/98



       The HTMLEditorKit.write(...) method incorrectly writes <ol> type attribute.
       It converts <ol type="I"> to <ol type="i">, but these are two different types of numeration (the first "I II ..", the second "i ii .." ).

       ------------------Example-----------------------------------
      import java.awt.swing.text.html.*;
      import java.awt.swing.text.html.*;
      import java.awt.swing.text.*;
      public class Test {

         public static void main(String argv[]) {
              String test="<html> <head><title>Swing tests</title></head><body><OL type=I><LI><P>Test 1</P></ol></body></html>";
              HTMLEditorKit c= new HTMLEditorKit();
              Document doc=c.createDefaultDocument();
              try {
                 c.read(new java.io.StringReader(test),doc,0);
                 c.write(System.out,doc,0,6);
              } catch(Exception e) {
                  e.printStackTrace();
              }
        
         }

      }
      -------------------Output------------------------------------
      <html>
      <head>
      <title>Swing tests</title>
      </head>
       
      <body>
      <ol type="i">
       
      <li>
      <p>Test 1</p>
       
      </ol>
      </body>
      </html>


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            smanisunw Sunita Mani (Inactive)
            Reporter:
            aalievsunw Artem Aliev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: