[wp-trac] [WordPress Trac] #60455: HTML API: Trigger active format reconstruction when reaching text nodes.
WordPress Trac
noreply at wordpress.org
Fri Mar 8 22:15:59 UTC 2024
#60455: HTML API: Trigger active format reconstruction when reaching text nodes.
----------------------------------------+---------------------
Reporter: dmsnell | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: HTML API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+---------------------
Changes (by dmsnell):
* milestone: Future Release => 6.5
Comment:
@swissspidy @westonruter would appreciate some review on this. It seems
ready to go, but should be ported into the 6.5 branch. Should I go ahead
and merge it into `trunk`?
The quickest context is that we initially thought that we could overlook
text nodes in the HTML Processor (vs. the Tag Processor) because 6.5
wasn't going to support visiting them in that class. However, those text
nodes can trigger a process called active format reconstruction which can
change the stack of open elements. Thus, we're in a bind and //have// to
support text nodes regardless.
It's thankfully a small patch, and technically removes an oddity of the
Tag vs. HTML Processor interfaces in the process, because with this patch
both can now visit all tokens in a document.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60455#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list