public class EntifyStrings
extends java.lang.Object
DeEntify
,
DeEntifyStrings
,
Entify
,
EntifyStrings
,
Flatten
Constructor and Description |
---|
EntifyStrings() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
entifyHTML(java.lang.String text)
Converts text to HTML by quoting dangerous characters.
|
static java.lang.String |
entifyXML(java.lang.String text)
Converts text to XML by quoting dangerous characters.
|
static boolean |
isSimple(char c)
Can this character be included in an HTML document without entifying it?
|
static void |
preferDecimalEntities()
We should generate hex entities in preference to decimal ones.
|
static void |
preferHexEntities()
We should generate decimal entities in preference to hex ones.
|
static java.lang.String |
toHexEntity(char c)
Converts text to HTML by converting all characters to 香 form
|
static java.lang.String |
toHTMLEntity(char c)
Converts text to HTML by quoting dangerous characters.;
Does not convert space to
|
static java.lang.String |
toXMLEntity(char c)
Converts text to XML by quoting dangerous characters.;
Does not convert space to
|
public static java.lang.String entifyHTML(java.lang.String text)
text
- raw text to be processed. Must not be null.public static java.lang.String entifyXML(java.lang.String text)
text
- raw text to be processed. Must not be null.public static boolean isSimple(char c)
c
- character is questionpublic static void preferDecimalEntities()
public static void preferHexEntities()
public static java.lang.String toHTMLEntity(char c)
c
- raw character.public static java.lang.String toHexEntity(char c)
c
- raw character.public static java.lang.String toXMLEntity(char c)
c
- raw character.