Make WordPress Core

Changes between Initial Version and Version 16 of Ticket #64609


Ignore:
Timestamp:
03/02/2026 12:57:53 PM (7 weeks ago)
Author:
jonsurrell
Comment:

I've created #64776 to track the issue for PRE and LISTING. I don't expect those to be addressed in 7.0.

This ticket now focuses specifically on TEXTAREA.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #64609

    • Property Keywords has-patch has-unit-tests added
    • Property Status changed from assigned to closed
    • Property Resolution changed from to fixed
    • Property Summary changed from HTML API: set_modifiable_text() ignores leading newlines in PRE, LISTING, TEXTAREA to HTML API: set_modifiable_text() ignores leading newlines in TEXTAREA
  • Ticket #64609 – Description

    initial v16  
    1 The `::set_modifiable_text()` method on `WP_HTML_Tag_Processor` and `WP_HTML_Processor` will fail to include a leading newline in the provided plaintext content on the first text of `TEXTAREA`, `PRE`, and `LISTING` elements.
     1The `::set_modifiable_text()` method on `WP_HTML_Tag_Processor` and `WP_HTML_Processor` will fail to include a leading newline in the provided plaintext content on the first text of `TEXTAREA` elements.
    22
    3 This is due to special rules for these elements that cause a single leading newline to be ignored immediately following the open tag.
     3This is due to special rules for `TEXTAREA` elements that cause a single leading newline to be ignored immediately following the open tag.
    44
    55{{{#!php