Class EscapeUtil


  • public final class EscapeUtil
    extends java.lang.Object
    String escape utilities.
    Since:
    3.4
    Author:
    Chris Jennings
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeHtml​(java.lang.String source)
      Escapes characters that have special meaning inside HTML.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • escapeHtml

        public static java.lang.String escapeHtml​(java.lang.String source)
        Escapes characters that have special meaning inside HTML. Not suitable for use to escape text for use as an attribute of an HTML element.
        Parameters:
        source - the string to escape
        Returns:
        the escaped string, or the original string