src/it/finsiel/siged/util/HtmlParser.java
public static String stripHtmlTags(String s, boolean breakToNl) {
        // initial check of input:
        if (s == null) {
            return null;
        }

        if (breakToNl) {
            // replace <br> and </br> with newline
            s = BREAK_TO_NL_PATTERN.matcher(s).replaceAll("\n");

            // replace </p> with double newline
            s = P_TO_DOUBLE_NL_PATTERN.matcher(s).replaceAll("\n\n");
        }

        // strip tags
        s = STRIP_TAGS_PATTERN.matcher(s).replaceAll("");

        return s;
    }
/**
     * Strips html tags. The method used is very simple: Everything between
     * tag-start (&lt) and tag-end (&gt) is removed. Optionaly br tags are
     * replaced by newline and ending p tags with double newline.
     * 
     * @param s
     *            input string
     * @param breakToNl
     *            if true, newlines are inserted for br and p tags
     * @return output without html tags (null on error)
     * 
     * @deprecated Please use the more advanced and correct
     * @see stripHtmlTags(String) method
     */
Strips html tags. The method used is very simple: Everything between
tag-start (<) and tag-end (>) is removed. Optionaly br tags are
replaced by newline and ending p tags with double newline.

@param s
input string
@param breakToNl
if true, newlines are inserted for br and p tags
@return output without html tags (null on error)

@deprecated Please use the more advanced and correct
@see stripHtmlTags(String) method
Strips html tags . The method used is very simple : Everything between tag - start ( < ) and tag - end ( > ) is removed . Optionaly br tags are replaced by newline and ending p tags with double newline . @param s input string @param breakToNl if true newlines are inserted for br and p tags @return output without html tags ( null on error ) @deprecated Please use the more advanced and correct @see stripHtmlTags ( String ) method
public static String stripHtmlTags(String s, boolean breakToNl) {
        if (s == null) {
            return null;
        }
        if (breakToNl) {
            s = BREAK_TO_NL_PATTERN.matcher(s).replaceAll("\n");
            s = P_TO_DOUBLE_NL_PATTERN.matcher(s).replaceAll("\n\n");
        }
        s = STRIP_TAGS_PATTERN.matcher(s).replaceAll("");
        return s;
    }
public static String stripHtmlTags ( String s , boolean breakToNl ) { if ( s == null ) { return null ; } if ( breakToNl ) { s = BREAK_TO_NL_PATTERN . matcher ( s ) . replaceAll ( "\n" ) ; s = P_TO_DOUBLE_NL_PATTERN . matcher ( s ) . replaceAll ( "\n\n" ) ; } s = STRIP_TAGS_PATTERN . matcher ( s ) . replaceAll ( "" ) ; return s ; }
Strips html tags.
Strips html tags .
// initial check of input: // replace <br> and </br> with newline // replace </p> with double newline // strip tags