Class HtmlParser

java.lang.Object
io.goobi.viewer.controller.HtmlParser

public final class HtmlParser extends Object
Tools for parsing html
Author:
florian
  • Method Details

    • isHtml

      public static boolean isHtml(String text)
      Guess if the given text should be interpreted as html based in the existence of closing html tags or empty line break tags
      Parameters:
      text -
      Returns:
      true if text is HTML content; false otherwise
    • stripJS

      public static String stripJS(String s)
      Duplicate of StringTools.stripJS(String) because it seemed to fit here
      Parameters:
      s -
      Returns:
      s stripped of any JavaScript
    • getPlaintext

      public static String getPlaintext(String htmlText)
    • getDisallowedHtmlTags

      public static Set<String> getDisallowedHtmlTags()
    • getDisallowedHtmlTagsForDisplay

      public static String getDisallowedHtmlTagsForDisplay()
    • getHtmlReplacements

      public static Map<String,String> getHtmlReplacements()