Make WordPress Core


Ignore:
Timestamp:
01/11/2022 03:12:21 AM (3 years ago)
Author:
noisysocks
Message:

Update packages to include these bug fixes from Gutenberg:

  • [Block Library - Query Pagination Next]: Hide block if custom query has no results
  • [WP 5.9] Fix: HTML tags like inline images in nav links break submenu layout
  • Check for nextpage to display page links for paginated posts
  • Navigation: Set the default for --navigation-layout-align to "flex-start" when using vertical orientation
  • [Block Library - Query Loop]: Use gap for the grid view
  • Update page list flex variables to match navigation.
  • Site logo: Fix range control on landscape logo
  • Restore canvas padding for classic themes
  • RichText: Fix dead key input on Windows
  • Fix: Impossible to clear colors if color palettes are removed.
  • Gallery block: pass any custom attributes through the gallery v2 migration script
  • Reduce specificity of legacy font sizes defined by core
  • Update: Improve escaping on the search block

See #54487.
Props isabel_brison.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9/src/wp-includes/blocks/search.php

    r52042 r52552  
    4747        '<label for="%1$s" class="wp-block-search__label screen-reader-text">%2$s</label>',
    4848        $input_id,
    49         empty( $attributes['label'] ) ? __( 'Search' ) : $attributes['label']
     49        empty( $attributes['label'] ) ? __( 'Search' ) : esc_html( $attributes['label'] )
    5050    );
    5151    if ( $show_label && ! empty( $attributes['label'] ) ) {
     
    5353            '<label for="%1$s" class="wp-block-search__label">%2$s</label>',
    5454            $input_id,
    55             $attributes['label']
     55            esc_html( $attributes['label'] )
    5656        );
    5757    }
     
    6262            '<input type="search" id="%s" class="wp-block-search__input %s" name="s" value="%s" placeholder="%s" %s required />',
    6363            $input_id,
    64             $input_classes,
     64            esc_attr( $input_classes ),
    6565            esc_attr( get_search_query() ),
    6666            esc_attr( $attributes['placeholder'] ),
     
    7878        if ( ! $use_icon_button ) {
    7979            if ( ! empty( $attributes['buttonText'] ) ) {
    80                 $button_internal_markup = $attributes['buttonText'];
     80                $button_internal_markup = esc_html( $attributes['buttonText'] );
    8181            }
    8282        } else {
     
    9090        $button_markup = sprintf(
    9191            '<button type="submit" class="wp-block-search__button %s" %s>%s</button>',
    92             $button_classes,
     92            esc_attr( $button_classes ),
    9393            $inline_styles['button'],
    9494            $button_internal_markup
     
    9999    $field_markup         = sprintf(
    100100        '<div class="wp-block-search__inside-wrapper %s" %s>%s</div>',
    101         $field_markup_classes,
     101        esc_attr( $field_markup_classes ),
    102102        $inline_styles['wrapper'],
    103103        $input_markup . $button_markup
     
    286286
    287287    return array(
    288         'input'   => ! empty( $input_styles ) ? sprintf( ' style="%s"', implode( ' ', $input_styles ) ) : '',
    289         'button'  => ! empty( $button_styles ) ? sprintf( ' style="%s"', implode( ' ', $button_styles ) ) : '',
    290         'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', implode( ' ', $wrapper_styles ) ) : '',
     288        'input'   => ! empty( $input_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $input_styles ) ) ) : '',
     289        'button'  => ! empty( $button_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $button_styles ) ) ) : '',
     290        'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) : '',
    291291    );
    292292}
Note: See TracChangeset for help on using the changeset viewer.