[wp-trac] [WordPress Trac] #58517: HTML API: Introduce HTML Processor, a higher-level partner to the Tag Processor
WordPress Trac
noreply at wordpress.org
Tue Mar 5 05:32:34 UTC 2024
#58517: HTML API: Introduce HTML Processor, a higher-level partner to the Tag
Processor
----------------------------------------+------------------------------
Reporter: dmsnell | Owner: Bernhard Reiter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4
Component: HTML API | Version:
Severity: normal | Resolution: fixed
Keywords: has-unit-tests 2nd-opinion | Focuses:
----------------------------------------+------------------------------
Comment (by dmsnell):
In [changeset:"57768" 57768]:
{{{
#!CommitTicketReference repository="" revision="57768"
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 https://github.com/WordPress/wordpress-develop/pull/6185
Discussed in https://core.trac.wordpress.org/ticket/60687
Props jonsurrell.
Follow-up to [60687].
See #58517.
Fixes #60687.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58517#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list