Make WordPress Core


Ignore:
Timestamp:
04/21/2023 01:30:11 PM (3 years ago)
Author:
zieladam
Message:

HTML API: Fix a case where updates are overlooked when seeking to earlier locations.

This retains the WP_HTML_Tag_Processor attribute updates applied before calling seek() – they were erroneously erased in some cases.

Props dmsnell.
Fixes #58160.

File:
1 edited

Legend:

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

    r55674 r55675  
    21432143         */
    21442144        if ( $requires_no_updating && $this->bytes_already_copied > 0 ) {
     2145            $this->html                 = $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
     2146            $this->bytes_already_copied = strlen( $this->output_buffer );
    21452147            return $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
    21462148        }
Note: See TracChangeset for help on using the changeset viewer.