forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML API: Ensure that breadcrumbs are properly retained after seeking.
In some cases, it's possible to seek back into a location found inside an element which has been closed before the point in the document where the `seek()` was made. In these cases the breadcrumb stack is lost, and calling `get_breadcrumbs()` after the seek will return the wrong information. In this patch, the HTML Processor takes a conservative approach and moves to the front of the document, then reparses the document until it reaches the sought-after location. This ensures consistency on the stack of open elements and active formats, and preserves breadcrumbs. Developed in WordPress#6185 Discussed in https://core.trac.wordpress.org/ticket/60687 Props jonsurrell. Follow-up to [60687]. See #58517. Fixes #60687. git-svn-id: https://develop.svn.wordpress.org/trunk@57768 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information
Showing
2 changed files
with
94 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters