-
Bug
-
Resolution: Unresolved
-
P4
-
8u241
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
When viewing an HTML document with HTMLEditorKit, if the page contains an <object> element with an unsupported classid, the element is turned into two red question marks "??". This is annoying because it prevents the usage of a fallback mechanism like this:
<object data="duke.svg" type="image/svg+xml">
<img src="duke.png">
</object>
In this case HTMLEditorKit properly renders the fallback image, but the question marks are still displayed.
It's possible to work around this issue by specifying the class name of a Swing component in the classid attribute:
<object data="duke.svg" type="image/svg+xml" classid="javax.swing.JLabel">
<img src="duke.png">
</object>
This removes the question marks, but now the object won't load in a standard browser supporting SVG images.
I'd suggest removing the red question marks, i.e. modify rgz getUnloadableRepresentation() method in javax.swing.text.html.ObjectView to return an empty JLabel.
FREQUENCY : always
When viewing an HTML document with HTMLEditorKit, if the page contains an <object> element with an unsupported classid, the element is turned into two red question marks "??". This is annoying because it prevents the usage of a fallback mechanism like this:
<object data="duke.svg" type="image/svg+xml">
<img src="duke.png">
</object>
In this case HTMLEditorKit properly renders the fallback image, but the question marks are still displayed.
It's possible to work around this issue by specifying the class name of a Swing component in the classid attribute:
<object data="duke.svg" type="image/svg+xml" classid="javax.swing.JLabel">
<img src="duke.png">
</object>
This removes the question marks, but now the object won't load in a standard browser supporting SVG images.
I'd suggest removing the red question marks, i.e. modify rgz getUnloadableRepresentation() method in javax.swing.text.html.ObjectView to return an empty JLabel.
FREQUENCY : always