Back to project page Kodesearch.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project Kodesearch listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kodesearch.external; //from www . j av a2 s .c o m import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.safety.Whitelist; public class CleanHtml { public static String html2text(String html) { Document doc = Jsoup.parse(html); doc.select("b").remove(); doc.outputSettings().charset("UTF-8"); html = Jsoup.clean(doc.body().html(), Whitelist.simpleText()); //html = StringEscapeUtils.unescapeHtml(html); return html; // return Jsoup.clean(bodyHtml, whitelist)(html).toString(); } }