Skip to content

Commit

Permalink
Editor: Update packages for 6.1 Release Candidate 2.
Browse files Browse the repository at this point in the history
Package updates for bug and regression fixes:
- `@wordpress/block-directory: 3.15.8`
- `@wordpress/block-editor: 10.0.7`
- `@wordpress/block-library: 7.14.8`
- `@wordpress/components: 21.0.6`
- `@wordpress/customize-widgets: 3.14.8`
- `@wordpress/edit-post: 6.14.8`
- `@wordpress/edit-site: 4.14.10`
- `@wordpress/edit-widgets: 4.14.8`
- `@wordpress/editor: 12.16.7`
- `@wordpress/format-library: 3.15.7`
- `@wordpress/interface: 4.16.6`
- `@wordpress/list-reusable-blocks: 3.15.6`
- `@wordpress/nux: 5.15.6`
- `@wordpress/preferences: 2.9.6`
- `@wordpress/reusable-blocks: 3.15.7`
- `@wordpress/server-side-render: 3.15.6`
- `@wordpress/widgets: 2.15.7`

Original PRs from Gutenberg repository:
- [WordPress/gutenberg#45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined]
- [WordPress/gutenberg#45045 #45045 Add: Missing output escaping on some blocks]
- [WordPress/gutenberg#44999 #44999 Escape comment author URL]
- [WordPress/gutenberg#44972 #44972 Navigator: restore focus only once per location]
- [WordPress/gutenberg#44858 #44858 Spacing Sizes Control: Try improving layout spacing]
- [WordPress/gutenberg#44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked]
- [WordPress/gutenberg#44809 #44809 Fix list outdents on Enter in quote block]
- [WordPress/gutenberg#44864 #44864 List v2: fix selection when creating paragraph from empty list item]
- [WordPress/gutenberg#44853 #44853 Fix overflowing patterns]
- [WordPress/gutenberg#45050 #45050 Fix visibility of nested Group block appender]
- [WordPress/gutenberg#44887 #44887 wp-env: Use case insensitive regex when checking WP version string]

Follow-up to [54257], [54335], [54383], [54483], [54486], [54490].

Props bernhard-reiter, audrasjb.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54632


git-svn-id: https://core.svn.wordpress.org/trunk@54184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Oct 18, 2022
1 parent 70a8be9 commit 90a91a8
Show file tree
Hide file tree
Showing 19 changed files with 428 additions and 362 deletions.
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/blocks/avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
$label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
}
// translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', $comment->comment_author_url, esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
}
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/legacy-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function render_block_core_legacy_widget( $attributes ) {

if ( isset( $attributes['instance']['encoded'], $attributes['instance']['hash'] ) ) {
$serialized_instance = base64_decode( $attributes['instance']['encoded'] );
if ( wp_hash( $serialized_instance ) !== $attributes['instance']['hash'] ) {
if ( ! hash_equals( wp_hash( $serialized_instance ), (string) $attributes['instance']['hash'] ) ) {
return '';
}
$instance = unserialize( $serialized_instance );
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
$toggle_aria_label_close,
esc_attr( implode( ' ', $responsive_container_classes ) ),
esc_attr( implode( ' ', $open_button_classes ) ),
safecss_filter_attr( $colors['overlay_inline_styles'] ),
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
__( 'Menu' ),
$toggle_button_content,
$toggle_close_button_content
Expand Down
6 changes: 3 additions & 3 deletions wp-includes/blocks/rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function render_block_core_rss( $attributes ) {
$rss = fetch_feed( $attributes['feedURL'] );

if ( is_wp_error( $rss ) ) {
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</div></div>';
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
}

if ( ! $rss->get_item_quantity() ) {
Expand Down Expand Up @@ -48,8 +48,8 @@ function render_block_core_rss( $attributes ) {
if ( $date ) {
$date = sprintf(
'<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
date_i18n( get_option( 'c' ), $date ),
date_i18n( get_option( 'date_format' ), $date )
esc_attr( date_i18n( get_option( 'c' ), $date ) ),
esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
);
}
}
Expand Down
10 changes: 5 additions & 5 deletions wp-includes/blocks/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,12 @@ function styles_for_block_core_search( $attributes ) {
// Add color styles.
$has_text_color = ! empty( $attributes['style']['color']['text'] );
if ( $has_text_color ) {
$button_styles[] = sprintf( 'color: %s;', esc_attr( $attributes['style']['color']['text'] ) );
$button_styles[] = sprintf( 'color: %s;', $attributes['style']['color']['text'] );
}

$has_background_color = ! empty( $attributes['style']['color']['background'] );
if ( $has_background_color ) {
$button_styles[] = sprintf( 'background-color: %s;', esc_attr( $attributes['style']['color']['background'] ) );
$button_styles[] = sprintf( 'background-color: %s;', $attributes['style']['color']['background'] );
}

$has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
Expand All @@ -399,9 +399,9 @@ function styles_for_block_core_search( $attributes ) {
}

return array(
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $input_styles ) ) ) : '',
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $button_styles ) ) ) : '',
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) : '',
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '',
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '',
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '',
'label' => ! empty( $label_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $label_styles ) ) ) ) : '',
);
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/widget-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function render_block_core_widget_group( $attributes, $content, $block ) {
$html = '';

if ( ! empty( $attributes['title'] ) ) {
$html .= $before_title . $attributes['title'] . $after_title;
$html .= $before_title . esc_html( $attributes['title'] ) . $after_title;
}

$html .= '<div class="wp-widget-group__inner-blocks">';
Expand Down
48 changes: 27 additions & 21 deletions wp-includes/css/dist/block-editor/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@
.block-editor-block-patterns-list__list-item {
cursor: pointer;
margin-bottom: 24px;
position: relative;
}
.block-editor-block-patterns-list__list-item.is-placeholder {
min-height: 100px;
Expand Down Expand Up @@ -1712,10 +1713,10 @@
color: #000;
}

.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child {
pointer-events: none;
}
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after {
content: "";
position: absolute;
top: 0;
Expand All @@ -1726,7 +1727,7 @@
border: 1px dashed currentColor;
border-radius: 2px;
}
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter {
visibility: hidden;
}

Expand Down Expand Up @@ -4273,7 +4274,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
grid-template-rows: 25px auto;
grid-template-rows: 16px auto;
}

.component-spacing-sizes-control {
Expand All @@ -4296,15 +4297,16 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 1/1;
justify-content: left;
height: 16px;
margin-top: 12px;
margin-top: 16px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
grid-column: 1/1;
justify-self: left;
margin-bottom: 0;
}
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
margin-top: 12px;
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control,
.component-spacing-sizes-control.is-unlinked .components-spacing-sizes-control__custom-value-input {
margin-top: 8px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
Expand All @@ -4322,42 +4324,45 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 2/2;
grid-row: 1/1;
justify-self: end;
padding: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: -4px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
margin-left: 4px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
grid-column: 3/3;
justify-self: end;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
grid-column: 3/3;
grid-row: 1/1;
justify-self: end;
line-height: 0;
margin-top: -4px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
grid-column: span 2;
margin-right: 8px;
height: 30px;
margin-right: 16px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
width: 124px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-range-control {
height: 40px;
/* Vertically center the RangeControl until it has true 40px height. */
display: flex;
align-items: center;
}
.component-spacing-sizes-control .components-range-control > .components-base-control__field {
/* Fixes RangeControl contents when the outer wrapper is flex */
flex: 1;
}
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
grid-column: span 3;
height: 40px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-range-control__mark {
height: 4px;
Expand All @@ -4376,6 +4381,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
grid-column: span 3;
margin-top: 8px;
}

body.admin-color-light {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style-rtl.min.css

Large diffs are not rendered by default.

48 changes: 27 additions & 21 deletions wp-includes/css/dist/block-editor/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@
.block-editor-block-patterns-list__list-item {
cursor: pointer;
margin-bottom: 24px;
position: relative;
}
.block-editor-block-patterns-list__list-item.is-placeholder {
min-height: 100px;
Expand Down Expand Up @@ -1712,10 +1713,10 @@
color: #000;
}

.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child {
pointer-events: none;
}
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after {
content: "";
position: absolute;
top: 0;
Expand All @@ -1726,7 +1727,7 @@
border: 1px dashed currentColor;
border-radius: 2px;
}
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter {
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter {
visibility: hidden;
}

Expand Down Expand Up @@ -4273,7 +4274,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
grid-template-rows: 25px auto;
grid-template-rows: 16px auto;
}

.component-spacing-sizes-control {
Expand All @@ -4296,15 +4297,16 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 1/1;
justify-content: left;
height: 16px;
margin-top: 12px;
margin-top: 16px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
grid-column: 1/1;
justify-self: left;
margin-bottom: 0;
}
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
margin-top: 12px;
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control,
.component-spacing-sizes-control.is-unlinked .components-spacing-sizes-control__custom-value-input {
margin-top: 8px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
Expand All @@ -4322,42 +4324,45 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 2/2;
grid-row: 1/1;
justify-self: end;
padding: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: -4px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
margin-right: 4px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
grid-column: 3/3;
justify-self: end;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
grid-column: 3/3;
grid-row: 1/1;
justify-self: end;
line-height: 0;
margin-top: -4px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
grid-column: span 2;
margin-left: 8px;
height: 30px;
margin-left: 16px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
width: 124px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-range-control {
height: 40px;
/* Vertically center the RangeControl until it has true 40px height. */
display: flex;
align-items: center;
}
.component-spacing-sizes-control .components-range-control > .components-base-control__field {
/* Fixes RangeControl contents when the outer wrapper is flex */
flex: 1;
}
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
grid-column: span 3;
height: 40px;
margin-top: 8px;
}
.component-spacing-sizes-control .components-range-control__mark {
height: 4px;
Expand All @@ -4376,6 +4381,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
grid-column: span 3;
margin-top: 8px;
}

body.admin-color-light {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 90a91a8

Please sign in to comment.