mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55675 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2142,6 +2142,8 @@ class WP_HTML_Tag_Processor {
|
||||
* to the end of the updated document and return.
|
||||
*/
|
||||
if ( $requires_no_updating && $this->bytes_already_copied > 0 ) {
|
||||
$this->html = $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
|
||||
$this->bytes_already_copied = strlen( $this->output_buffer );
|
||||
return $this->output_buffer . substr( $this->html, $this->bytes_already_copied );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user