Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P3
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: 1.2.0
-
Component/s: client-libs
-
Labels:
-
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 <hr> width attribute.
It writes "<hr width180>" instead of "<hr width=180>"
-------------------Example-----------------------------------
import java.awt.swing.text.html.*;
import java.awt.swing.text.*;
public class Test {
public static void main(String argv[]) {
String test="<!DOCTYPE HTML PUBLIC \"-//w3c//DTD html 3.2//EN\"><HTML><TITLE>test</TITLE><BODY><hr width=180></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,1);
} catch(Exception e) {
e.printStackTrace();
}
}
}
-------------------Output------------------------------------
<html>
<head>
<title>test</title>
</head>
<body><hr width180>
</body>
</html>
======================================================================