[wp-trac] [WordPress Trac] #64771: Existing block level custom CSS in a post breaks when the post is edited by user without unfiltered_html

WordPress Trac noreply at wordpress.org
Wed May 6 04:29:18 UTC 2026


#64771: Existing block level custom CSS in a post breaks when the post is edited by
user without unfiltered_html
-------------------------------------------------+-------------------------
 Reporter:  glendaviesnz                         |       Owner:  ramonopoly
     Type:  defect (bug)                         |      Status:  closed
 Priority:  high                                 |   Milestone:  7.0
Component:  Editor                               |     Version:  trunk
 Severity:  critical                             |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  reviewed                                       |
-------------------------------------------------+-------------------------
Changes (by ramonopoly):

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


Comment:

 In [changeset:"62300" 62300]:
 {{{
 #!CommitTicketReference repository="" revision="62300"
 Block Supports: strip custom CSS from blocks for users without edit_css
 capability

 Adds capability-gated CSS stripping so that when a user without `edit_css`
 saves a post, any `style.css` block attributes are removed from block
 comments using `WP_Block_Parser::next_token()`.

 Reviewed by audrasjb, peterwilsoncc.
 Merges [62257], [62299] to the 7.0 branch.

 Props aaronrobertshaw, audrasjb, dmsnell, glendaviesnz, jonsurrell,
 ozgursar, ramonopoly, shailu25, westonruter.

 Follow-up to [64544].

 Fixes #64771.
 }}}

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


More information about the wp-trac mailing list