Class HtmlEntityUtils


  • public class HtmlEntityUtils
    extends java.lang.Object
    Utility class for escaping and unescaping HTML/XML entities. This class provides methods that were previously supplied by Apache Commons Text.
    Since:
    2.1.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String unescapeHtml4​(java.lang.String text)
      Unescapes HTML4 entities in a string.
      static java.lang.String unescapeXml​(java.lang.String text)
      Unescapes XML entities in a string.
      • Methods inherited from class java.lang.Object

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

      • unescapeXml

        public static java.lang.String unescapeXml​(java.lang.String text)
        Unescapes XML entities in a string.
        Parameters:
        text - the text to unescape
        Returns:
        the unescaped text
      • unescapeHtml4

        public static java.lang.String unescapeHtml4​(java.lang.String text)
        Unescapes HTML4 entities in a string.
        Parameters:
        text - the text to unescape
        Returns:
        the unescaped text