Java HTML Parse Jsoup cleanHtmlFromString(String stringToClean)

Here you can find the source of cleanHtmlFromString(String stringToClean)

Description

Utility to remove the HTML tags in the String

License

Open Source License

Parameter

Parameter Description
stringToClean a parameter

Declaration

public static String cleanHtmlFromString(String stringToClean) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.jsoup.Jsoup;

import org.jsoup.safety.Whitelist;

public class Main {
    /**//  ww  w .j a v  a2 s  .  c om
     * Utility to remove the HTML tags in the String
     * 
     * @param stringToClean
     * @return
     */
    public static String cleanHtmlFromString(String stringToClean) {
        return Jsoup.clean(stringToClean, Whitelist.basic());
    }
}

Related

  1. br2nl(String html)
  2. clean(String html)
  3. clean(String html, Whitelist whitelist)
  4. cleanHTML(final String html)
  5. cleanHtmlCode(String html)
  6. cleanHTMLTags(String str)
  7. cleanupHtmlDoc(String s)
  8. clearBody(String html)
  9. coverTag(String html, String... tagNames)