[wp-trac] [WordPress Trac] #64531: assertEqualHTML may ignore leading whitespace text

WordPress Trac noreply at wordpress.org
Fri Jan 23 18:04:25 UTC 2026


#64531: assertEqualHTML may ignore leading whitespace text
--------------------------------------+-------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.9.1
Component:  Build/Test Tools          |     Version:  6.9
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------
Changes (by jonsurrell):

 * owner:  (none) => jonsurrell
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61519" 61519]:
 {{{
 #!CommitTicketReference repository="" revision="61519"
 Build/Test Tools: Ensure `assertEqualHTML()` recognizes whitespace text.

 Ensure whitespace text nodes are correctly represented by
 `build_visual_html_tree()`.

 The `build_visual_html_tree()` function used by `assertEqualHTML()` would
 remove some leading whitespace from text nodes. Some whitespace-only text
 nodes were omitted from the tree.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10765.

 Follow-up to [60295].

 Props jonsurrell, dmsnell, bernhard-reiter.
 Fixes #64531.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64531#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list