Class HtmlUtil

java.lang.Object
org.ka2ddo.util.HtmlUtil

public class HtmlUtil extends Object
A collection of utility functions for manipulating HTML.
Author:
Andrew Pavlin, KA2DDO
  • Method Details

    • stripHtml

      public static String stripHtml(String s)
      Strip HTML directives from a String. Useful when doing accessibility on a widget whose label text uses HTML formatting.
      Parameters:
      s - String to parse
      Returns:
      stripped String
    • htmlEscape

      public static String htmlEscape(String s)
      Expand the provided plain-text (not HTML) string with HTML escapes so that it isn't mis-interpreted by HTML parsers.
      Parameters:
      s - plain-text String
      Returns:
      String escaped for HTML compatibility