[wp-trac] [WordPress Trac] #64418: Valid CSS is causing failure in the Additional CSS panel

WordPress Trac noreply at wordpress.org
Mon Dec 15 18:05:19 UTC 2025


#64418: Valid CSS is causing failure in the Additional CSS panel
--------------------------+---------------------
 Reporter:  drw158        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  7.0
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  css
--------------------------+---------------------

Comment (by westonruter):

 @jonsurrell @dmsnell Should we change the validation to disallow
 `</style`? I'm reminded of the code in
 `\WP_HTML_Tag_Processor::set_modifiable_text`. Or should escaping on
 output similarly do:

 {{{#!php
 <?php
 $plaintext_content = preg_replace_callback(
         '~</(?P<TAG_NAME>style)~i',
         static function ( $tag_match ) {
                 return "\\3c\\2f{$tag_match['TAG_NAME']}";
         },
         $plaintext_content
 );
 }}}

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


More information about the wp-trac mailing list