Package org.htmlcleaner

Examples of org.htmlcleaner.DoctypeToken


  /**
   *  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);
      }
    }
  }
View Full Code Here


   
    return out.toByteArray();
  }
 
  private DoctypeToken createXHTMLDoctypeToken(){
    return new DoctypeToken("html", "PUBLIC", "-//W3C//DTD XHTML 1.1//EN", "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd");
  }
View Full Code Here

  /**
   *  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);
      }
    }
  }
View Full Code Here

  /**
   *  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);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.htmlcleaner.DoctypeToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.