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/wordpress-develop#6185 Discussed in https://core.trac.wordpress.org/ticket/60687 Props jonsurrell. Follow-up to [60687]. See #58517. Fixes #60687. Built from https://develop.svn.wordpress.org/trunk@57768 git-svn-id: http://core.svn.wordpress.org/trunk@57269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information
Showing
2 changed files
with
73 additions
and
40 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