![]()
Groups of elements used to specify containment relationships.
Constants:
|
Code » | ||||||||||||||||||||||
![]()
Element scopes limit where close tags can have effects.
For example, a table cannot be implicitly closed by a
</p> even if
the table appears inside a <p> because the <table> element
introduces a scope.
Constants:
|
Code » |
Balances tags in trusted HTML.
|
code » | ||||
Ensures that there are end-tags for all and only for non-void start tags.
|
code » | ||||
![]()
Parses attribute names and values out of a tag body and applies the attribute
white-list to produce a tag body containing only safe attributes.
Arguments:
Returns: string
a tag-body that consists only of safe attributes.
|
code » | ||||
Replaces tags not on the white-list with empty text nodes, dropping all
attributes, and drops other non-text nodes such as comments.
Arguments:
|
code » | ||||
Returns an array of HTML tokens including tags, text nodes and comments.
"Special" elements, like
<script>...</script> whose bodies cannot
include nested elements, are returned as single tokens.
|
code » | ||||
![]()
Picks which open HTML elements to close.
Arguments:
Returns: number
the length of openElementStack after closing any tags that
need to be closed.
|
code » | ||||
![]()
No description.
|
code » | ||||
Normalizes HTML tokens and concatenates them into a string.
|
code » | ||||
Replaces tags not on the white-list with empty text nodes, dropping all
attributes, and drops other non-text nodes such as comments.
Arguments:
Returns: string
the input but with potentially dangerous tokens removed.
|
code » |
![]()
No description.
|
Code » | |
![]()
The body of a tag between the end of the name and the closing
>
if any.
|
Code » | |
![]()
A global matcher that separates attributes out of the tag body cruft.
|
Code » | |
![]()
Matches the equals-sign and any attribute value following it, but does not
capture any
> that would close the tag.
|
Code » | |
![]()
Matches content following a tag name or attribute value, and before the
beginning of the next attribute value.
|
Code » | |
![]()
We limit the nesting limit of balanced HTML to a large but manageable number
so that built-in browser limits aren't likely to kick in and undo all our
matching of start and end tags.
This mitigates the HTML parsing equivalent of stack smashing attacks. Otherwise, crafted inputs like <p><p><p><p>...Ad nauseam...</p></p></p></p> could exploit
browser bugs, and/or undocumented nesting limit recovery code to misnest
tags.
|
Code » | |
![]()
Per-element, a child that can contain block content.
|
Code » | |
![]()
Matches when the next character cannot continue a tag name.
|
Code » | |
![]()
Character code constant for
'!' . @private
|
Code » | |
![]()
Character code constant for
'<' . @private
|
Code » | |
![]()
Character code constant for
'?' . @private
|
Code » | |
![]()
Character code constant for
'/' . @private
|
Code » | |
![]()
Matches HTML comments including HTML 5 "bogus comments" of the form
<!...> or <?...> or </...> .
|
Code » | |
![]()
No description.
|
Code » | |
![]()
The groups which the element can contain.
Defaults to 0.
|
Code » | |
![]()
The groups into which the element falls.
The default is an inline element.
|
Code » | |
![]()
The scopes in which an element falls.
No property defaults to 0.
|
Code » | |
![]()
Regexp pattern for an HTML token after a doctype.
Special elements introduces a capturing group for use with a
back-reference.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Matches the open tag and body of a special element :
one whose body cannot contain nested elements so uses special parsing rules.
It does not include the end tag.
|
Code » | |
![]()
Regexp pattern for an HTML tag.
|
Code » | |
![]()
A character that continues a tag name as defined at
http://www.w3.org/html/wg/drafts/html/master/syntax.html#tag-name-state
|
Code » | |
![]()
An HTML tag which captures the name in group 1,
and any attributes in group 2.
|
Code » | |
![]()
Regexp pattern for an HTML text node.
|
Code » | |
![]()
No description.
|
Code » |