HTML API: Fix a fatal error when processing malformed document with unclosed attribute.
Props: dlh, costdev, dmsnell. Fixes: #58637. Built from https://develop.svn.wordpress.org/trunk@56133 git-svn-id: http://core.svn.wordpress.org/trunk@55645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
67863b9fb7
commit
817c701f29
|
@ -546,6 +546,10 @@ class WP_HTML_Tag_Processor {
|
|||
}
|
||||
|
||||
// Ensure that the tag closes before the end of the document.
|
||||
if ( $this->bytes_already_parsed >= strlen( $this->html ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$tag_ends_at = strpos( $this->html, '>', $this->bytes_already_parsed );
|
||||
if ( false === $tag_ends_at ) {
|
||||
return false;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta3-56132';
|
||||
$wp_version = '6.3-beta3-56133';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue