Bug 647674 - JTextPane produces incorrect content after parsing the html text
Summary: JTextPane produces incorrect content after parsing the html text
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Denis Lila
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-29 04:49 UTC by cnsturgeon2000
Modified: 2011-01-19 21:09 UTC (History)
8 users (show)

Fixed In Version: java-1.6.0-openjdk-1.6.0.0-48.1.8.4.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-08 20:55:40 UTC


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

Description cnsturgeon2000 2010-10-29 04:49:35 UTC
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 04:50:19 UTC
Created attachment 456375 [details]
Java source file

Comment 2 Fedora Update System 2011-01-18 16:26:01 UTC
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 16:27:35 UTC
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 21:05:55 UTC
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 21:09:32 UTC
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.