[wp-trac] [WordPress Trac] #54296: Make sure the name does not contain spacing before creating the class
    WordPress Trac 
    noreply at wordpress.org
       
    Wed Oct 20 13:08:38 UTC 2021
    
    
  
#54296: Make sure the name does not contain spacing before creating the class
--------------------------+-----------------------------
 Reporter:  amustaque97   |      Owner:  amustaque97
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:
 Severity:  minor         |   Keywords:
  Focuses:  css           |
--------------------------+-----------------------------
 This was reported in
 [https://wordpress.slack.com/archives/C02QB2JS7/p1629731076397000].
 The process of generating a class for a style variation is not checking
 for spaces.
 **Step-by-step reproduction instructions**
 Add a style variation such as (note the spacing in the name):
 {{{#!php
 <?php
 register_block_style( $block, array(
         'label'                         => esc_html__( 'Style Name',
 'slug' ),
         'name'                          => 'style-class-1 style-class-2'
 ) );
 }}}
 When this style variation is selected by the user the CSS class attached
 to the block is
 {{{
 is-style-class-1 style-class-2
 }}}
 ''register_block_style'' function should return an error it doesn't
 contain spaces.
-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54296>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list