[wp-trac] [WordPress Trac] #60385: HTML API: Text nodes may be incorrectly split
WordPress Trac
noreply at wordpress.org
Tue Jan 30 22:07:58 UTC 2024
#60385: HTML API: Text nodes may be incorrectly split
--------------------------+------------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: HTML API | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by dmsnell):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"57489" 57489]:
{{{
#!CommitTicketReference repository="" revision="57489"
HTML API: Fix splitting single text node.
When `next_token()` was introduced, it brought a subtle bug. When
encountering a `<` in the HTML stream which did not lead to a tag or
comment or other token, it was treating the full text span to that point
as one text node, and the following span another text node.
The entire span should be one text node.
In this patch the Tag Processor properly detects this scenario and
combines the spans into one text node.
Follow-up to [57348]
Props jonsurrell
Fixes #60385
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60385#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list