@wordpress/block-library 7.3.14 → 7.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "7.3.14",
3
+ "version": "7.3.15",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "00f3fb76974fe21d2b5f8bea8c81df5dc1afcb4a"
77
+ "gitHead": "2da87d9d142b43474399943a6ae0689398c6c13e"
78
78
  }
@@ -626,7 +626,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
626
626
  __( 'Close menu' ), // Close button label.
627
627
  esc_attr( implode( ' ', $responsive_container_classes ) ),
628
628
  esc_attr( implode( ' ', $open_button_classes ) ),
629
- safecss_filter_attr( $colors['overlay_inline_styles'] ),
629
+ esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
630
630
  __( 'Menu' ),
631
631
  $toggle_button_content
632
632
  );
@@ -45,7 +45,7 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
45
45
  if ( ! empty( $attributes['scale'] ) ) {
46
46
  $image_styles .= "object-fit:{$attributes['scale']};";
47
47
  }
48
- $featured_image = str_replace( 'src=', 'style="' . esc_attr( $image_styles ) . '" src=', $featured_image );
48
+ $featured_image = str_replace( '<img ', '<img style="' . esc_attr( safecss_filter_attr( $image_styles ) ) . '" ', $featured_image );
49
49
  }
50
50
 
51
51
  return "<figure $wrapper_attributes>$featured_image</figure>";
package/src/rss/index.php CHANGED
@@ -20,7 +20,7 @@ function render_block_core_rss( $attributes ) {
20
20
  $rss = fetch_feed( $attributes['feedURL'] );
21
21
 
22
22
  if ( is_wp_error( $rss ) ) {
23
- return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</div></div>';
23
+ return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
24
24
  }
25
25
 
26
26
  if ( ! $rss->get_item_quantity() ) {
@@ -48,8 +48,8 @@ function render_block_core_rss( $attributes ) {
48
48
  if ( $date ) {
49
49
  $date = sprintf(
50
50
  '<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
51
- date_i18n( get_option( 'c' ), $date ),
52
- date_i18n( get_option( 'date_format' ), $date )
51
+ esc_attr( date_i18n( get_option( 'c' ), $date ) ),
52
+ esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
53
53
  );
54
54
  }
55
55
  }
@@ -287,12 +287,12 @@ function styles_for_block_core_search( $attributes ) {
287
287
  // Add color styles.
288
288
  $has_text_color = ! empty( $attributes['style']['color']['text'] );
289
289
  if ( $has_text_color ) {
290
- $button_styles[] = sprintf( 'color: %s;', esc_attr( $attributes['style']['color']['text'] ) );
290
+ $button_styles[] = sprintf( 'color: %s;', $attributes['style']['color']['text'] );
291
291
  }
292
292
 
293
293
  $has_background_color = ! empty( $attributes['style']['color']['background'] );
294
294
  if ( $has_background_color ) {
295
- $button_styles[] = sprintf( 'background-color: %s;', esc_attr( $attributes['style']['color']['background'] ) );
295
+ $button_styles[] = sprintf( 'background-color: %s;', $attributes['style']['color']['background'] );
296
296
  }
297
297
 
298
298
  $has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
@@ -301,9 +301,9 @@ function styles_for_block_core_search( $attributes ) {
301
301
  }
302
302
 
303
303
  return array(
304
- 'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $input_styles ) ) ) : '',
305
- 'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $button_styles ) ) ) : '',
306
- 'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) : '',
304
+ 'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '',
305
+ 'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '',
306
+ 'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '',
307
307
  );
308
308
  }
309
309