Problematic tags displaying HTML in Java

Posted by Andez on Stack Overflow See other posts from Stack Overflow or by Andez
Published on 2010-10-15T08:55:33Z Indexed on 2010/12/22 11:54 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

Hi again,

I have the following tag included in my HTML which causes the JEditorPane not to show the HTML output.

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

Not so much a big deal but anyone know why this would happen?

Cannot find too much documentation on this - best I came up with was someone having a go a few years ago to see what was supported on retro virus site.

At the minute I'm doing a simple find replace on the string which is not good - are there any better ways? I've seen a lot of people saying that RegEx is no good.

The code I have used is

this._html = this._html.replace( "<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">", "");

Andez

© Stack Overflow or respective owner

Related posts about java

Related posts about tags