private static SpannableStringBuilder fromHtml(String subject,String source,ThemeColors colors,ImageGetter imageGetter,boolean openSpoilers){
  Parser parser=new Parser();
  try {
    parser.setProperty(Parser.schemaProperty,HtmlParserHolder.schema);
  }
 catch (  org.xml.sax.SAXNotRecognizedException e) {
    throw new RuntimeException(e);
  }
catch (  org.xml.sax.SAXNotSupportedException e) {
    throw new RuntimeException(e);
  }
  HtmlToSpannedConverter converter=new HtmlToSpannedConverter(subject,source,colors,imageGetter,openSpoilers,parser);
  return converter.convert();
}

private static SpannableStringBuilder fromHtml ( String subject , String source , ThemeColors colors , ImageGetter imageGetter , boolean openSpoilers ) { Parser parser = new Parser ( ) ; try { parser . setProperty ( Parser . schemaProperty , HtmlParserHolder . schema ) ; } catch ( org . xml . sax . SAXNotRecognizedException e ) { throw new RuntimeException ( e ) ; } catch ( org . xml . sax . SAXNotSupportedException e ) { throw new RuntimeException ( e ) ; } HtmlToSpannedConverter converter = new HtmlToSpannedConverter ( subject , source , colors , imageGetter , openSpoilers , parser ) ; return converter . convert ( ) ; }
returns displayable styled text from the provided html string . any & lt ; img & gt ; tags in the html will use the specified imagegetter to request a representation of the image ( use null if you don ' t want this ) and the specified taghandler to handle unknown tags ( specify null if you don ' t want this ) . < p > this uses tagsoup to handle real html , including all of the brokenness found in the wild .
