Jsoup.clean(html, "", Safelist.basic(), new Document.OutputSettings().prettyPrint(false));
For jsoup - 1.19.1