Problematic tags displaying HTML in Java
I have the following tag included in my HTML which causes the JEditorPane not to show the HTML output.
<META http-equiv="Content-Typ开发者_JAVA技巧e" 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
RegEx is not good for parsing the full HTML document. But in this case, I don't find any problem going with that.
Regarding your former question, I really don't have no idea.
精彩评论