code: public static String clean(String bodyHtml, String baseUri, Whitelist whitelist) {
          Document dirty = parseBodyFragment(bodyHtml, baseUri);
          Cleaner cleaner = new Cleaner(whitelist);
          Document clean = cleaner.clean(dirty);
          return clean.body().html();
      }
docs: Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted
  tags and attributes.
  
  @param bodyHtml  input untrusted HTML (body fragment)
  @param baseUri   URL to resolve relative URLs against
  @param whitelist white-list of permitted HTML elements
  @return safe HTML (body fragment)
  
  @see Cleaner#clean(Document)