JDK-6325159 : Parsing of html page include a SCRIPT tag will produce random exceptions
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-16
  • Updated: 2011-01-19
  • Resolved: 2006-03-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b76Fixed
Related Reports
Relates :  
Description
J2SE Version (please include all output from java -version flag):
  java version "1.6.0-ea"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b50)
  Java HotSpot(TM) Client VM (build 1.6.0-ea-b50, mixed mode)

Does this problem occur on J2SE 1.3, 1.4.x or 1.5?  Yes / No (pick one)
  Yes

Bug Description:

  If the a html page include a SCRIPT tag and the content is not hidding 
  with a comment then JEditorPane will parse the content of the SCRIPT 
  tag. Because all available browsers can handle the SCRIPT tag since 
  multiple years, many user does not use the commnet tag inside the 
  SCRIPT tag. The parsing of the SCRIPT content will produce random
  exceptions.

  browser works fine with 2 attached html file, but not java.

Comments
SUGGESTED FIX '<script>' should be treated as '<!--' and '</script>' as '--!>'
23-12-2005

EVALUATION Other than SCRIPT tags are ok.
23-12-2005

EVALUATION We're trying to parse content of the SCRIPT tag as if it were HTML. We do not make special cases out of non-HTML tags like SCRIPT (and i'm not sure about STYLE, too).
08-11-2005