public class Entities extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Entities.EscapeMode |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
codepointsForName(String name,
int[] codepoints) |
|
static String |
escape(String string) |
HTML escape an input string, using the default settings (UTF-8, base entities).
|
static String |
escape(String string,
Document.OutputSettings out) |
HTML escape an input string.
|
static String |
getByName(String name) |
Get the character(s) represented by the named entity
|
static Character |
getCharacterByName(String name) |
Deprecated.
does not support characters outside the BMP or multiple character names
|
static boolean |
isBaseNamedEntity(String name) |
Check if the input is a known named entity in the base entity set.
|
static boolean |
isNamedEntity(String name) |
Check if the input is a known named entity
|
static String |
unescape(String string) |
Un-escape an HTML escaped string.
|
public static boolean isNamedEntity(String name)
name - the possible entity name (e.g. "lt" or "amp")public static boolean isBaseNamedEntity(String name)
name - the possible entity name (e.g. "lt" or "amp")isNamedEntity(String)public static Character getCharacterByName(String name)
name - named entity (e.g. "lt" or "amp")public static String getByName(String name)
name - entity (e.g. "lt" or "amp")public static int codepointsForName(String name, int[] codepoints)
public static String escape(String string, Document.OutputSettings out)
< is returned as <string - the un-escaped string to escapeout - the output settings to usepublic static String escape(String string)
< is returned as
<string - the un-escaped string to escapeCopyright © 2009–2018 Jonathan Hedley. All rights reserved.