Bug 647674 - JTextPane produces incorrect content after parsing the html text
JTextPane produces incorrect content after parsing the html text
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
rawhide
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Denis Lila
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-29 00:49 EDT by cnsturgeon2000
Modified: 2011-01-19 16:09 EST (History)
8 users (show)

See Also:
Fixed In Version: java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-08 15:55:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Java source file (606 bytes, text/plain)
2010-10-29 00:50 EDT, cnsturgeon2000
no flags Details

  None (edit)
Description cnsturgeon2000 2010-10-29 00:49:35 EDT
Description of problem:
JTextPane produces incorrect content after parsing the html text

Version-Release number of selected component (if applicable):
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.2) (fedora-41.1.8.2.fc12-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


How reproducible:
TestTextPane.java

import javax.swing.JTextPane;
import javax.swing.text.BadLocationException;


public class TestTextPane {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JTextPane pane = new JTextPane();
		pane.setContentType("text/html");
		String content = "<html><body>http://www.nationmaster.com/red/country/as-australia/mil-military&all=1 Heelhoo</body></html>";
		pane.setText(content);
		
		try {
			System.out.println(pane.getDocument().getText(0, pane.getDocument().getLength()));
		} catch (BadLocationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}

Steps to Reproduce:
1. javac TestTextPane.java
2. java TestTextPane
3.
  
Actual results:
http://www.nationmaster.com/red/country/as-australia/mil-military&all;=1 Heelhoo

Expected results:
http://www.nationmaster.com/red/country/as-australia/mil-military&all=1 Heelhoo

Additional info:
The Oracle JDK doesn't have this issue
Comment 1 cnsturgeon2000 2010-10-29 00:50:19 EDT
Created attachment 456375 [details]
Java source file
Comment 2 Fedora Update System 2011-01-18 11:26:01 EST
java-1.6.0-openjdk-1.6.0.0-50.1.9.4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-50.1.9.4.fc14
Comment 3 Fedora Update System 2011-01-18 11:27:35 EST
java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13
Comment 4 Fedora Update System 2011-01-19 16:05:55 EST
java-1.6.0-openjdk-1.6.0.0-50.1.9.4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2011-01-19 16:09:32 EST
java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.