CmsHtmlStripper
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.opencms.util.CmsHtmlStripper (Showing top 8 results out of 315)

origin: org.opencms/opencms-solr

/**
 * Convenience method for adding several tags to preserve.<p>
 * 
 * @param preserveTags a <code>List&lt;String&gt;</code> with the case-insensitive tag names of the tags to preserve
 *      
 * @see #addPreserveTag(String)
 */
public void addPreserveTagList(final List preserveTags) {
  for (Iterator it = preserveTags.iterator(); it.hasNext();) {
    addPreserveTag((String)it.next());
  }
}
origin: org.opencms/opencms-solr

/**
 * Default constructor that turns echo on and uses the settings for replacing tags.
 * <p>
 */
public CmsHtmlStripper() {
  reset();
}
origin: org.opencms/opencms-core

/**
 * Convenience method for adding several tags to preserve
 * in form of a delimiter-separated String.<p>
 *
 * The String will be <code>{@link CmsStringUtil#splitAsList(String, char, boolean)}</code>
 * with <code>tagList</code> as the first argument, <code>separator</code> as the
 * second argument and the third argument set to true (trimming - support).<p>
 *
 * @param tagList a delimiter-separated String with case-insensitive tag names to preserve by
 *      <code>{@link #stripHtml(String)}</code>
 * @param separator the delimiter that separates tag names in the <code>tagList</code> argument
 *
 * @see #addPreserveTag(String)
 */
public void addPreserveTags(final String tagList, final char separator) {
  List<String> tags = CmsStringUtil.splitAsList(tagList, separator, true);
  addPreserveTagList(tags);
}
origin: org.opencms/opencms-core

content = tidy(content);
origin: org.opencms/opencms-solr

/**
 * Convenience method for adding several tags to preserve 
 * in form of a delimiter-separated String.<p>
 * 
 * The String will be <code>{@link CmsStringUtil#splitAsList(String, char, boolean)}</code>
 * with <code>tagList</code> as the first argument, <code>separator</code> as the 
 * second argument and the third argument set to true (trimming - support).<p>
 * 
 * @param tagList a delimiter-separated String with case-insensitive tag names to preserve by  
 *      <code>{@link #stripHtml(String)}</code>
 * @param separator the delimiter that separates tag names in the <code>tagList</code> argument 
 *      
 * @see #addPreserveTag(String)
 */
public void addPreserveTags(final String tagList, final char separator) {
  List tags = CmsStringUtil.splitAsList(tagList, separator, true);
  addPreserveTagList(tags);
}
origin: org.opencms/opencms-solr

content = tidy(content);
origin: org.opencms/opencms-core

/**
 * Default constructor that turns echo on and uses the settings for replacing tags.
 * <p>
 */
public CmsHtmlStripper() {
  reset();
}
origin: org.opencms/opencms-core

/**
 * Convenience method for adding several tags to preserve.<p>
 *
 * @param preserveTags a <code>List&lt;String&gt;</code> with the case-insensitive tag names of the tags to preserve
 *
 * @see #addPreserveTag(String)
 */
public void addPreserveTagList(List<String> preserveTags) {
  for (Iterator<String> it = preserveTags.iterator(); it.hasNext();) {
    addPreserveTag(it.next());
  }
}
org.opencms.utilCmsHtmlStripper

Javadoc

Simple html tag stripper that allows configuration of html tag names that are allowed.

All tags that are not explicitly allowed via invocation of one of the addPreserve... methods will be missing in the result of the method #stripHtml(String).

Instances are reusable but not shareable (multithreading). If configuration should be changed between subsequent invocations of #stripHtml(String) method #reset() has to be called.

Most used methods

  • addPreserveTag
    Adds a tag that will be preserved by #stripHtml(String).
  • addPreserveTagList
    Convenience method for adding several tags to preserve.
  • reset
    Resets the configuration of the tags to preserve. This is called from the constructor and only has t
  • tidy
    Internally tidies with cleanup and XHTML.

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)