Class SnippetStripper


  • public class SnippetStripper
    extends Object
    Useful class used to filter snippets from lucene, excluding those characters that invalidate HTML page
    Since:
    3.0
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • SnippetStripper

        public SnippetStripper()
    • Method Detail

      • strip

        public static String strip​(String snippet)
        Strips all characters from the input string that may invalidate XML. Particularly useful for search result summaries
        Parameters:
        snippet - the string to process
        Returns:
        the sanitized string