/**
* Fix for a bug in HTMLCleaner which cannot handle HTML5 doctypes correctly
* See http://sourceforge.net/tracker/?func=detail&aid=3190583&group_id=183053&atid=903696
*/
private void fixHTML5Doctype(){
DoctypeToken docType = htmlNode.getDocType();
if(docType != null){
if(docType.getContent().equalsIgnoreCase(Html5DoctypeToken.BADDOCTYPE)){
Html5DoctypeToken newToken = new Html5DoctypeToken("html",null,null,null);
htmlNode.setDocType(newToken);
}
}
}