public final class HtmlElementTables
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
HtmlElementTables.DenseElementSet |
A set of elements.
|
static class |
HtmlElementTables.HtmlElementNames |
Maps between element indices and element names.
|
static class |
HtmlElementTables.SparseElementMultitable |
Maps element to elements to lists of elements.
|
static class |
HtmlElementTables.SparseElementToElements |
Maps element indices to sets of the same.
|
static class |
HtmlElementTables.TextContentModel |
For each element, the kinds of character data it can contain.
|
static class |
HtmlElementTables.TextContentModelBit |
Describes properties of the content that could be added to an element
as a result of a parse that includes its open tag.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
TEXT_NODE |
Pseudo element index for text nodes.
|
Constructor | Description |
---|---|
HtmlElementTables(HtmlElementTables.HtmlElementNames elementNames,
org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix canContain,
org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix closedOnClose,
org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix closedOnOpen,
HtmlElementTables.SparseElementToElements explicitClosers,
HtmlElementTables.SparseElementMultitable impliedElements,
HtmlElementTables.TextContentModel textContentModel,
HtmlElementTables.DenseElementSet resumable) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
canContain(int parent,
int child) |
True if parent can directly contain child.
|
boolean |
canContainPlainText(int index) |
Whether parsing can produce an element with the given index that contains
a text node that has human readable text instead of script or style
source code.
|
boolean |
canContainText(int index) |
Whether parsing can produce an element with the given index that contains
a text node.
|
java.lang.String |
canonNameForIndex(int index) |
The element index for the element with the given name.
|
int |
indexForName(java.lang.String canonName) |
The element index for the element with the given name.
|
int |
nElementTypes() |
The number of element types which is also the exclusive upper bound on
element indices.
|
boolean |
resumable(int index) |
The elements that can be resumed after misnested inline tags.
|
static boolean[] |
unpack(int[] packed,
int length) |
Unpacks a boolean[] from an array of ints.
|
public static final int TEXT_NODE
public HtmlElementTables(HtmlElementTables.HtmlElementNames elementNames, org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix canContain, org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix closedOnClose, org.owasp.html.HtmlElementTables.DenseElementBinaryMatrix closedOnOpen, HtmlElementTables.SparseElementToElements explicitClosers, HtmlElementTables.SparseElementMultitable impliedElements, HtmlElementTables.TextContentModel textContentModel, HtmlElementTables.DenseElementSet resumable)
public boolean canContain(int parent, int child)
public int indexForName(java.lang.String canonName)
public java.lang.String canonNameForIndex(int index)
public boolean resumable(int index)
public boolean canContainText(int index)
public boolean canContainPlainText(int index)
public int nElementTypes()
public static boolean[] unpack(int[] packed, int length)
Copyright © 2019 OWASP. All rights reserved.