[wp-trac] [WordPress Trac] #60385: HTML API: Text nodes may be incorrectly split

WordPress Trac noreply at wordpress.org
Tue Jan 30 17:12:00 UTC 2024


#60385: HTML API: Text nodes may be incorrectly split
--------------------------+-----------------------------
 Reporter:  jonsurrell    |      Owner:  jonsurrell
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  HTML API      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Certain inputs cause `WP_HTML_Tag_Processor::next_token()` to split text
 nodes that should be a single text node.

 Example input: `test< /A>`

 This should produce a single text node of `test< /A>` (via
 `::get_modifiable_text()`). Instead it finds two adjacent text nodes of
 `test` immediately followed by `< /A>`.

 [https://software.hixie.ch/utilities/js/live-dom-
 viewer/?%3Cbody%3Etest%3C%20%2FA%3E See the single text node parsed here.]


 This was found thanks to the external test suite proposed in #60227.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60385>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list