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 » | ||||
![]()
No description.
|
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 » |