public class HTMLEntities
extends java.lang.Object
| Constructor and Description |
|---|
HTMLEntities()
Initialize HTML translation maps.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decode(java.lang.String str)
Convert HTML entities to special and extended unicode characters
equivalents.
|
java.lang.String |
encode(java.lang.String str)
Convert special and extended characters into HTML entitities.
|
static java.lang.String |
htmlAmpersand(java.lang.String str)
Replace & characters with & HTML entities.
|
static java.lang.String |
htmlDoubleQuotes(java.lang.String str)
Replace double quotes characters with HTML entities.
|
static java.lang.String |
htmlSingleQuotes(java.lang.String str)
Replace single quotes characters with HTML entities.
|
static java.lang.String |
unhtmlAmpersand(java.lang.String str)
Replace & HTML entities with & characters.
|
static java.lang.String |
unhtmlDoubleQuotes(java.lang.String str)
Replace single quotes HTML entities with equivalent character.
|
static java.lang.String |
unhtmlSingleQuotes(java.lang.String str)
Replace single quotes HTML entities with equivalent character.
|
public java.lang.String encode(java.lang.String str)
str - input stringpublic java.lang.String decode(java.lang.String str)
str - input stringpublic static java.lang.String htmlSingleQuotes(java.lang.String str)
str - the input stringpublic static java.lang.String unhtmlSingleQuotes(java.lang.String str)
str - the input stringpublic static java.lang.String htmlDoubleQuotes(java.lang.String str)
str - the input stringpublic static java.lang.String unhtmlDoubleQuotes(java.lang.String str)
str - the input stringpublic static java.lang.String htmlAmpersand(java.lang.String str)
str - the input stringpublic static java.lang.String unhtmlAmpersand(java.lang.String str)
str - the input string