| Name | Size | Mode | Actions |
|---|---|---|---|
| class-wp-html-active-formatting-elements.php | 7264 | 0644 | editdlrm |
| class-wp-html-attribute-token.php | 2775 | 0644 | editdlrm |
| class-wp-html-decoder.php | 16692 | 0644 | editdlrm |
| class-wp-html-doctype-info.php | 25357 | 0644 | editdlrm |
| class-wp-html-open-elements.php | 22478 | 0644 | editdlrm |
| class-wp-html-processor-state.php | 11345 | 0644 | editdlrm |
| class-wp-html-processor.php | 206421 | 0644 | editdlrm |
| class-wp-html-span.php | 1099 | 0644 | editdlrm |
| class-wp-html-stack-event.php | 1639 | 0644 | editdlrm |
| class-wp-html-tag-processor.php | 146891 | 0644 | editdlrm |
| class-wp-html-text-replacement.php | 1409 | 0644 | editdlrm |
| class-wp-html-token.php | 3410 | 0644 | editdlrm |
| class-wp-html-unsupported-exception.php | 3606 | 0644 | editdlrm |
| html5-named-character-references.php | 80163 | 0644 | editdlrm |
/home/altere25/rockymountainlax.com/wp-includes/html-api/class-wp-html-processor.php (206421B)
one
two`. * - HTML with unexpected tag closers, e.g. `
one more
`. * - Non-void tags with self-closing flag, e.g. `the DIV is still open.WP_HTML_Processor::create_fragment()'
),
'6.4.0'
);
}
$this->state = new WP_HTML_Processor_State();
$this->state->stack_of_open_elements->set_push_handler(
function ( WP_HTML_Token $token ): void {
$is_virtual = ! isset( $this->state->current_token ) || $this->is_tag_closer();
$same_node = isset( $this->state->current_token ) && $token->node_name === $this->state->current_token->node_name;
$provenance = ( ! $same_node || $is_virtual ) ? 'virtual' : 'real';
$this->element_queue[] = new WP_HTML_Stack_Event( $token, WP_HTML_Stack_Event::PUSH, $provenance );
$this->change_parsing_namespace( $token->integration_node_type ? 'html' : $token->namespace );
}
);
$this->state->stack_of_open_elements->set_pop_handler(
function ( WP_HTML_Token $token ): void {
$is_virtual = ! isset( $this->state->current_token ) || ! $this->is_tag_closer();
$same_node = isset( $this->state->current_token ) && $token->node_name === $this->state->current_token->node_name;
$provenance = ( ! $same_node || $is_virtual ) ? 'virtual' : 'real';
$this->element_queue[] = new WP_HTML_Stack_Event( $token, WP_HTML_Stack_Event::POP, $provenance );
$adjusted_current_node = $this->get_adjusted_current_node();
if ( $adjusted_current_node ) {
$this->change_parsing_namespace( $adjusted_current_node->integration_node_type ? 'html' : $adjusted_current_node->namespace );
} else {
$this->change_parsing_namespace( 'html' );
}
}
);
/*
* Create this wrapper so that it's possible to pass
* a private method into WP_HTML_Token classes without
* exposing it to any public API.
*/
$this->release_internal_bookmark_on_destruct = function ( string $name ): void {
parent::release_bookmark( $name );
};
}
/**
* Stops the parser and terminates its execution when encountering unsupported markup.
*
* @throws WP_HTML_Unsupported_Exception Halts execution of the parser.
*
* @since 6.7.0
*
* @param string $message Explains support is missing in order to parse the current node.
*/
private function bail( string $message ) {
$here = $this->bookmarks[ $this->state->current_token->bookmark_name ];
$token = substr( $this->html, $here->start, $here->length );
$open_elements = array();
foreach ( $this->state->stack_of_open_elements->stack as $item ) {
$open_elements[] = $item->node_name;
}
$active_formats = array();
foreach ( $this->state->active_formatting_elements->walk_down() as $item ) {
$active_formats[] = $item->node_name;
}
$this->last_error = self::ERROR_UNSUPPORTED;
$this->unsupported_exception = new WP_HTML_Unsupported_Exception(
$message,
$this->state->current_token->node_name,
$here->start,
$token,
$open_elements,
$active_formats
);
throw $this->unsupported_exception;
}
/**
* Returns the last error, if any.
*
* Various situations lead to parsing failure but this class will
* return `false` in all those cases. To determine why something
* failed it's possible to request the last error. This can be
* helpful to know to distinguish whether a given tag couldn't
* be found or if content in the document caused the processor
* to give up and abort processing.
*
* Example
*
* $processor = WP_HTML_Processor::create_fragment( '