[wp-trac] [WordPress Trac] #64771: The new block level custom CSS breaks when edited by user without unfiltered_html

WordPress Trac noreply at wordpress.org
Tue Mar 3 16:13:53 UTC 2026


#64771: The new block level custom CSS breaks when edited by user without
unfiltered_html
--------------------------+---------------------
 Reporter:  glendaviesnz  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  7.0
Component:  Editor        |     Version:  trunk
 Severity:  critical      |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by ozgursar):

 == Reproduction Report

 I couldn't reproduce this with or without Gutenberg plugin installed

 === Environment
 - WordPress: 7.0-beta2-61752-src
 - PHP: 8.2.29
 - Server: nginx/1.29.4
 - Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 145.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Five 1.4
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.1

 === Steps taken
 1. Create a blank post
 2. Add a paragraph
 3. Edit in html mode to add the following:

 {{{
 <p class="has-custom-css">my <span>custom</span> text</p>
 }}}

 4. Add the following additional css:

 {{{
 color: red;
 & span {color: blue}
 }}}

 5. ❌ Bug is not occurring

 === Screenshots/Screencast with results
 Editor
 [[Image(https://i.imgur.com/SrkStd4.png)]]

 Editor (HTML view)
 [[Image(https://i.imgur.com/v6n8nK5.png)]]

 Frontend
 [[Image(https://i.imgur.com/j8SvUA6.png)]]

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


More information about the wp-trac mailing list