Make WordPress Core


Ignore:
Timestamp:
02/11/2025 08:02:29 PM (4 months ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

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

    r59464 r59812  
    25502550            );
    25512551            return false;
     2552        }
     2553
     2554        $existing_bookmark = $this->bookmarks[ $bookmark_name ];
     2555
     2556        if (
     2557            $this->token_starts_at === $existing_bookmark->start &&
     2558            $this->token_length === $existing_bookmark->length
     2559        ) {
     2560            return true;
    25522561        }
    25532562
Note: See TracChangeset for help on using the changeset viewer.