[wp-trac] [WordPress Trac] #64607: HTML API: Normalize may remove significant text from PRE, TEXTAREA content

WordPress Trac noreply at wordpress.org
Thu Feb 26 10:37:18 UTC 2026


#64607: HTML API: Normalize may remove significant text from PRE, TEXTAREA content
--------------------------------------+-------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  7.0
Component:  HTML API                  |     Version:  6.7
 Severity:  minor                     |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------
Changes (by jonsurrell):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61747" 61747]:
 {{{
 #!CommitTicketReference repository="" revision="61747"
 HTML API: Preserve newlines when normalizing special elements.

 Ensures normalization preserves content in `PRE`, `LISTING`, and
 `TEXTAREA` elements. These elements ignore a single leading newline during
 parsing. Normalization now injects a newline after the tag opener to
 trigger this behavior, preventing significant newlines from being
 incorrectly stripped.

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

 Props jonsurrell, dmsnell, mukesh27.
 Fixes #64607.
 }}}

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


More information about the wp-trac mailing list