Make WordPress Core


Ignore:
Timestamp:
07/04/2023 08:43:43 PM (2 years ago)
Author:
azaozz
Message:

HTML API: Fix a fatal error when processing malformed document with unclosed attribute.

Props: dlh, costdev, dmsnell.
Fixes: #58637.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php

    r55734 r56133  
    547547
    548548            // Ensure that the tag closes before the end of the document.
     549            if ( $this->bytes_already_parsed >= strlen( $this->html ) ) {
     550                return false;
     551            }
     552
    549553            $tag_ends_at = strpos( $this->html, '>', $this->bytes_already_parsed );
    550554            if ( false === $tag_ends_at ) {
Note: See TracChangeset for help on using the changeset viewer.