Class HTMLSupport

    • Method Detail

      • toHTML

        public static String toHTML​(String string)
        Escape String to HTML.
        Parameters:
        string - string to escape
        Returns:
        escaped String
      • toNonBreakingSpaces

        public static String toNonBreakingSpaces​(String string)
        Replaces regular spaces with HTML non-breaking spaces.
        Parameters:
        string - string
        Returns:
        string with nbsp's
      • insertHTMLLineBreaks

        public static String insertHTMLLineBreaks​(String s,
                                                  String delimiters,
                                                  int maxLineLength)
        Inserts HTML line breaks after delimiters. Resulting lines are trimmed of whitespace.
        Parameters:
        s - string
        delimiters - delimiter string
        maxLineLength - max length per line
        Returns:
        string with line breaks (<br>) inserted after delimiter characters