app/src/main/java/org/andstatus/app/util/MyHtml.java
/** Strips ALL markup from the String, excluding line breaks */
Strips ALL markup from the String, excluding line breaks
Strips ALL markup from the String excluding line breaks
@NonNull
    public static String htmlToPlainText(String html) {
        if (StringUtil.isEmpty(html)) return "";
        String str0 = HTML_LINEBREAK_PATTERN.matcher(html).replaceAll("\n");
        String str1 = hasHtmlMarkup(str0)
                ? Html.fromHtml(html, Html.FROM_HTML_MODE_COMPACT).toString()
                : str0;
        String str2 = unescapeHtml(str1);
        return stripExcessiveLineBreaks(str2);
    }
@ NonNull public static String htmlToPlainText ( String html ) { if ( StringUtil . isEmpty ( html ) ) return "" ; String str0 = HTML_LINEBREAK_PATTERN . matcher ( html ) . replaceAll ( "\n" ) ; String str1 = hasHtmlMarkup ( str0 ) ? Html . fromHtml ( html , Html . FROM_HTML_MODE_COMPACT ) . toString ( ) : str0 ; String str2 = unescapeHtml ( str1 ) ; return stripExcessiveLineBreaks ( str2 ) ; }
Strips ALL markup from the String, excluding line breaks
Strips ALL markup from the String excluding line breaks