mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
HTML API: Stop counting no-op seek operations against the max seek count.
This allows `seek()` to be freely called when the current cursor at the provided bookmark. Props dmsnell, jonsurrell, westonruter. Fixes #62085. Built from https://develop.svn.wordpress.org/trunk@59812 git-svn-id: http://core.svn.wordpress.org/trunk@59154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5f79466650
commit
08c4498647
|
|
@ -2551,6 +2551,15 @@ class WP_HTML_Tag_Processor {
|
|||
return false;
|
||||
}
|
||||
|
||||
$existing_bookmark = $this->bookmarks[ $bookmark_name ];
|
||||
|
||||
if (
|
||||
$this->token_starts_at === $existing_bookmark->start &&
|
||||
$this->token_length === $existing_bookmark->length
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ++$this->seek_count > static::MAX_SEEK_OPS ) {
|
||||
_doing_it_wrong(
|
||||
__METHOD__,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59809';
|
||||
$wp_version = '6.8-alpha-59812';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user