Package emissary.transform.decode
Class HtmlEscape
- java.lang.Object
-
- emissary.transform.decode.HtmlEscape
-
@Deprecated public class HtmlEscape extends Object
Deprecated.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
main(String[] args)
Deprecated.static byte[]
unescapeEntities(byte[] s)
Deprecated.Unescape HTML entities without measuring what was changedstatic byte[]
unescapeEntities(byte[] s, CharacterCounterSet counters)
Deprecated.Unescape HTML Entities like into normal characters Also handle broken entities like &;nbsp; and   (extra semi-colon and missing semi-colon respectively)static String
unescapeEntities(String s)
Deprecated.Unescape HTML entities without counting what was changedstatic String
unescapeEntities(String s, CharacterCounterSet counters)
Deprecated.Unescape HTML entities like into normal characters Also handle broken entities like &;nbsp; and   (extra semi-colon and missing semi-colon respectively)static byte[]
unescapeHtml(byte[] data)
Deprecated.Unescape some HTML data without counting what was donestatic byte[]
unescapeHtml(byte[] data, 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.static String
unescapeHtml(String s)
Deprecated.Unescape some HTML data without counting what was changedstatic String
unescapeHtml(String s, CharacterCounterSet counters)
Deprecated.Unescape some HTML data, turning$#xxxx;
into UNICODE charactersstatic char[]
unescapeHtmlChar(String s, boolean isHex)
Deprecated.Unescape one HTML character or null if we cannot convert
-
-
-
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 characterscounters
- 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 HTMLcounters
- 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 encodingisHex
- 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   (extra semi-colon and missing semi-colon respectively)- Parameters:
s
- the string to find entities incounters
- 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   (extra semi-colon and missing semi-colon respectively)
-
main
public static void main(String[] args)
Deprecated.
-
-