public enum HtmlContext extends Enum<HtmlContext>
| Enum Constant and Description |
|---|
CSS
In CSS content outside a comment, string, or URI.
|
CSS_COMMENT
In CSS inside a comment.
|
CSS_DQ_STRING
In CSS inside a double quoted string.
|
CSS_DQ_URI
In CSS in a URI terminated by the first double quote.
|
CSS_SQ_STRING
In CSS inside a single quoted string.
|
CSS_SQ_URI
In CSS in a URI terminated by the first single quote.
|
CSS_URI
In CSS in a URI terminated by the first close parenthesis.
|
HTML_ATTRIBUTE_NAME
Inside an HTML attribute name.
|
HTML_BEFORE_ATTRIBUTE_VALUE
Following an equals sign (=) after an attribute name in an HTML tag.
|
HTML_BEFORE_CLOSE_TAG_NAME
Just before a tag name on an close tag.
|
HTML_BEFORE_OPEN_TAG_NAME
Just before a tag name on an open tag.
|
HTML_COMMENT
Inside an HTML comment.
|
HTML_NORMAL_ATTR_VALUE
Inside a normal (non-CSS, JS, or URI) HTML attribute value.
|
HTML_PCDATA
Outside an HTML tag, directive, or comment.
|
HTML_RCDATA
Inside an element whose content is RCDATA where text and entities can appear but where nested
elements cannot.
|
HTML_TAG
Before an HTML attribute or the end of a tag.
|
HTML_TAG_NAME
Just after a tag name, e.g.
|
JS
In JavaScript, outside a comment, string, or Regexp literal.
|
JS_BLOCK_COMMENT
In JavaScript inside a block comment.
|
JS_DQ_STRING
In JavaScript inside a double quoted string.
|
JS_LINE_COMMENT
In JavaScript inside a line comment.
|
JS_REGEX
In JavaScript inside a regular expression literal.
|
JS_SQ_STRING
In JavaScript inside a single quoted string.
|
TEXT
Plain text; no escaping.
|
URI
In a URI, which may or may not be in an HTML attribute.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage()
Error message to show when trying to print a dynamic value inside of this state.
|
EscapingMode |
getEscapingMode()
The escaping mode appropriate for dynamic content inserted at this state.
|
static HtmlContext |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HtmlContext[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HtmlContext HTML_PCDATA
public static final HtmlContext HTML_RCDATA
<title> and <textarea> fall into this category since they
cannot contain nested elements in HTML.public static final HtmlContext HTML_BEFORE_OPEN_TAG_NAME
public static final HtmlContext HTML_BEFORE_CLOSE_TAG_NAME
public static final HtmlContext HTML_TAG_NAME