[wp-trac] [WordPress Trac] #61974: HTML API: Add method to split text nodes by null or empty prefixes.

WordPress Trac noreply at wordpress.org
Mon Sep 2 23:03:08 UTC 2024


#61974: HTML API: Add method to split text nodes by null or empty prefixes.
-------------------------+--------------------
 Reporter:  dmsnell      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  6.7
Component:  HTML API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+--------------------
 There are places in the HTML Processor that need to parse differently
 according to whether text content is a sequence of NULL bytes or
 whitespace characters after decoding. It's awkward and inefficient to do
 this within the HTML Processor, however, as it requires eagerly decoding
 text nodes.

 The Tag Processor could expose a method to efficiently split apart a text
 node when needed, and then classify it, to aid in the parsing. This method
 could further be used to identify inter-element whitespace, which is
 usually ignored when rendering HTML.

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


More information about the wp-trac mailing list