|
code.google.com home | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<HtmlTextEscapingMode> org.owasp.html.HtmlTextEscapingMode
public enum HtmlTextEscapingMode
From section 8.1.2.6 of http://www.whatwg.org/specs/web-apps/current-work/
The text in CDATA and RCDATA elements must not contain any occurrences of the string "" (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that case-insensitively match the tag name of the element followed by one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0020 SPACE, U+003E GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that string is part of an escaping text span.
See also http://www.whatwg.org/specs/web-apps/current-work/#cdata-rcdata-restrictions for the elements which fall in each category.
Enum Constant Summary | |
---|---|
CDATA
A span of text where HTML special characters are interpreted literally, as in a SCRIPT tag. |
|
CDATA_SOMETIMES
Like CDATA but only for certain browsers. |
|
PCDATA
Normally escaped character data that breaks around comments and tags. |
|
PLAIN_TEXT
A span of text where HTML special characters are interpreted literally, where there is no end tag. |
|
RCDATA
A span of text and character entity references where HTML special characters are interpreted literally, as in a TITLE tag. |
|
VOID
Cannot contain data. |
Method Summary | |
---|---|
static boolean |
allowsEscapingTextSpan(java.lang.String canonTagName)
True iff the content following the given tag allows escaping text spans: <!--…--> that escape even things that might
be an end tag for the corresponding open tag. |
static HtmlTextEscapingMode |
getModeForTag(java.lang.String canonTagName)
The mode used for content following a start tag with the given name. |
static boolean |
isTagFollowedByLiteralContent(java.lang.String canonTagName)
True if content immediately following the start tag must be treated as special CDATA so that <'s are not treated as starting tags, comments or directives. |
static boolean |
isVoidElement(java.lang.String canonTagName)
True iff the tag cannot contain any content -- will an HTML parser consider the element to have ended immediately after the start tag. |
static HtmlTextEscapingMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static HtmlTextEscapingMode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final HtmlTextEscapingMode PCDATA
public static final HtmlTextEscapingMode CDATA
public static final HtmlTextEscapingMode CDATA_SOMETIMES
CDATA
but only for certain browsers.
public static final HtmlTextEscapingMode RCDATA
public static final HtmlTextEscapingMode PLAIN_TEXT
public static final HtmlTextEscapingMode VOID
Method Detail |
---|
public static HtmlTextEscapingMode[] values()
for (HtmlTextEscapingMode c : HtmlTextEscapingMode.values()) System.out.println(c);
public static HtmlTextEscapingMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic static HtmlTextEscapingMode getModeForTag(java.lang.String canonTagName)
public static boolean allowsEscapingTextSpan(java.lang.String canonTagName)
<!--…-->
that escape even things that might
be an end tag for the corresponding open tag.
public static boolean isTagFollowedByLiteralContent(java.lang.String canonTagName)
public static boolean isVoidElement(java.lang.String canonTagName)
|
code.google.com home | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |