mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
HTML API: Fix a fatal error when processing malformed document with unclosed attribute.
Props: dlh, costdev, dmsnell. Fixes: #58637. git-svn-id: https://develop.svn.wordpress.org/trunk@56133 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user