Class HTML
java.lang.Object
com.github.rjeschke.txtmark.HTML
HTML utility class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final HTMLElement[]HTML block level elements.Entity to character decoding map.Character to entity encoding map.private static final char[]Characters corresponding to ENTITY_NAMES.private static final String[]List of valid HTML/XML entity names.Set of HTML block level tags.Set of valid HTML tags.Set of unsafe HTML tags.Set of valid markdown link prefixes.private static final String[]Valid markdown link prefixes for auto links.private static final HTMLElement[]HTML unsafe elements. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final booleanstatic final booleanisHtmlBlockElement(String value) static final booleanisHtmlElement(String value) static final booleanisLinkPrefix(String value) static final booleanisUnsafeHtmlElement(String value)
-
Field Details
-
ENTITY_NAMES
List of valid HTML/XML entity names. -
ENTITY_CHARS
private static final char[] ENTITY_CHARSCharacters corresponding to ENTITY_NAMES. -
LINK_PREFIXES
Valid markdown link prefixes for auto links. -
BLOCK_ELEMENTS
HTML block level elements. -
UNSAFE_ELEMENTS
HTML unsafe elements. -
encodeMap
-
decodeMap
-
HTML_ELEMENTS
-
HTML_UNSAFE
-
HTML_BLOCK_ELEMENTS
-
LINK_PREFIX
-
-
Constructor Details
-
HTML
private HTML()Constructor. (Singleton)
-
-
Method Details
-
isLinkPrefix
- Parameters:
value- String to check.- Returns:
- Returns
trueif the given String is a link prefix.
-
isEntity
- Parameters:
value- String to check.- Returns:
- Returns
trueif the given String is an entity.
-
isHtmlElement
- Parameters:
value- String to check.- Returns:
- Returns
trueif the given String is a HTML tag.
-
isHtmlBlockElement
- Parameters:
value- String to check.- Returns:
- Returns
trueif the given String is a HTML block level tag.
-
isUnsafeHtmlElement
- Parameters:
value- String to check.- Returns:
- Returns
trueif the given String is an unsafe HTML tag.
-