summaryrefslogtreecommitdiff
path: root/javax/swing/JEditorPane.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JEditorPane.java')
-rw-r--r--javax/swing/JEditorPane.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/javax/swing/JEditorPane.java b/javax/swing/JEditorPane.java
index 06844355a..a503bb6e8 100644
--- a/javax/swing/JEditorPane.java
+++ b/javax/swing/JEditorPane.java
@@ -869,6 +869,13 @@ public class JEditorPane extends JTextComponent
public final void setContentType(String type)
{
+ // Strip off content type parameters.
+ int paramIndex = type.indexOf(';');
+ if (paramIndex > -1)
+ {
+ // TODO: Handle character encoding.
+ type = type.substring(0, paramIndex).trim();
+ }
if (editorKit != null
&& editorKit.getContentType().equals(type))
return;