Make WordPress Core


Ignore:
Timestamp:
05/03/2023 11:55:26 AM (21 months ago)
Author:
Bernhard Reiter
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, zieladam.
Merges [55675] to the 6.2 branch.
Fixes #58160.

File:
1 edited

Legend:

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

    r55668 r55707  
    21032103         */
    21042104        if ( $requires_no_updating && $this->bytes_already_copied > 0 ) {
     2105            $this->html                 = $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
     2106            $this->bytes_already_copied = strlen( $this->output_buffer );
    21052107            return $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
    21062108        }
Note: See TracChangeset for help on using the changeset viewer.