@@ -367,12 +367,12 @@ function styles_for_block_core_search( $attributes ) {
367367 // Add color styles.
368368 $ has_text_color = ! empty ( $ attributes ['style ' ]['color ' ]['text ' ] );
369369 if ( $ has_text_color ) {
370- $ button_styles [] = sprintf ( 'color: %s; ' , esc_attr ( $ attributes ['style ' ]['color ' ]['text ' ] ) );
370+ $ button_styles [] = sprintf ( 'color: %s; ' , $ attributes ['style ' ]['color ' ]['text ' ] );
371371 }
372372
373373 $ has_background_color = ! empty ( $ attributes ['style ' ]['color ' ]['background ' ] );
374374 if ( $ has_background_color ) {
375- $ button_styles [] = sprintf ( 'background-color: %s; ' , esc_attr ( $ attributes ['style ' ]['color ' ]['background ' ] ) );
375+ $ button_styles [] = sprintf ( 'background-color: %s; ' , $ attributes ['style ' ]['color ' ]['background ' ] );
376376 }
377377
378378 $ has_custom_gradient = ! empty ( $ attributes ['style ' ]['color ' ]['gradient ' ] );
@@ -399,9 +399,9 @@ function styles_for_block_core_search( $attributes ) {
399399 }
400400
401401 return array (
402- 'input ' => ! empty ( $ input_styles ) ? sprintf ( ' style="%s" ' , safecss_filter_attr ( implode ( ' ' , $ input_styles ) ) ) : '' ,
403- 'button ' => ! empty ( $ button_styles ) ? sprintf ( ' style="%s" ' , safecss_filter_attr ( implode ( ' ' , $ button_styles ) ) ) : '' ,
404- 'wrapper ' => ! empty ( $ wrapper_styles ) ? sprintf ( ' style="%s" ' , safecss_filter_attr ( implode ( ' ' , $ wrapper_styles ) ) ) : '' ,
402+ 'input ' => ! empty ( $ input_styles ) ? sprintf ( ' style="%s" ' , esc_attr ( safecss_filter_attr ( implode ( ' ' , $ input_styles ) ) ) ) : '' ,
403+ 'button ' => ! empty ( $ button_styles ) ? sprintf ( ' style="%s" ' , esc_attr ( safecss_filter_attr ( implode ( ' ' , $ button_styles ) ) ) ) : '' ,
404+ 'wrapper ' => ! empty ( $ wrapper_styles ) ? sprintf ( ' style="%s" ' , esc_attr ( safecss_filter_attr ( implode ( ' ' , $ wrapper_styles ) ) ) ) : '' ,
405405 'label ' => ! empty ( $ label_styles ) ? sprintf ( ' style="%s" ' , esc_attr ( safecss_filter_attr ( implode ( ' ' , $ label_styles ) ) ) ) : '' ,
406406 );
407407}
0 commit comments