Class HtmlEscape

    • Method Detail

      • unescapeHtml

        public static byte[] unescapeHtml​(byte[] data)
        Deprecated.
        Unescape some HTML data without counting what was done
        Parameters:
        data - the array of bytes containing HTML escaped characters
        Returns:
        modified byte array
      • unescapeHtml

        public static byte[] unescapeHtml​(@Nullable
                                          byte[] data,
                                          @Nullable
                                          CharacterCounterSet counters)
        Deprecated.
        Unescape some HTML data, turning &#xxxx; into UNICODE characters Because this operation inserts java Character objects into the byte array, it probably only makes sense to send in data that already matches the platform encoding (i.e. UTF-8 for normal usage). Otherwise the result will be a mixed up mess of multiple character sets that cannot possibly be understood or displayed properly.
        Parameters:
        data - the array of bytes containing HTML escaped characters
        counters - to measure what is changed
        Returns:
        modified byte array
      • unescapeHtml

        public static String unescapeHtml​(String s)
        Deprecated.
        Unescape some HTML data without counting what was changed
        Parameters:
        s - the string of characters possibly containing escaped HTML
        Returns:
        the new String without escaped HTML
      • unescapeHtml

        public static String unescapeHtml​(@Nullable
                                          String s,
                                          @Nullable
                                          CharacterCounterSet counters)
        Deprecated.
        Unescape some HTML data, turning $#xxxx; into UNICODE characters
        Parameters:
        s - the string of characters possibly containing escaped HTML
        counters - to measure what is changed
        Returns:
        the new String without escaped HTML
      • unescapeHtmlChar

        @Nullable
        public static char[] unescapeHtmlChar​(String s,
                                              boolean isHex)
        Deprecated.
        Unescape one HTML character or null if we cannot convert
        Parameters:
        s - the four digit number from the HTML encoding
        isHex - true if the digits are in hex
        Returns:
        the Unicode codepoint in a[] char or null
      • unescapeEntities

        public static String unescapeEntities​(String s)
        Deprecated.
        Unescape HTML entities without counting what was changed
        Parameters:
        s - the string to find entities in
      • unescapeEntities

        public static String unescapeEntities​(String s,
                                              @Nullable
                                              CharacterCounterSet counters)
        Deprecated.
        Unescape HTML entities like   into normal characters Also handle broken entities like &;nbsp; and &nbsp (extra semi-colon and missing semi-colon respectively)
        Parameters:
        s - the string to find entities in
        counters - to measure what was changed
      • unescapeEntities

        public static byte[] unescapeEntities​(byte[] s)
        Deprecated.
        Unescape HTML entities without measuring what was changed
      • unescapeEntities

        public static byte[] unescapeEntities​(byte[] s,
                                              @Nullable
                                              CharacterCounterSet counters)
        Deprecated.
        Unescape HTML Entities like   into normal characters Also handle broken entities like &;nbsp; and &nbsp (extra semi-colon and missing semi-colon respectively)
      • main

        public static void main​(String[] args)
        Deprecated.