Changeset 52552 for branches/5.9/src/wp-includes/blocks/search.php
- Timestamp:
- 01/11/2022 03:12:21 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9/src/wp-includes/blocks/search.php
r52042 r52552 47 47 '<label for="%1$s" class="wp-block-search__label screen-reader-text">%2$s</label>', 48 48 $input_id, 49 empty( $attributes['label'] ) ? __( 'Search' ) : $attributes['label']49 empty( $attributes['label'] ) ? __( 'Search' ) : esc_html( $attributes['label'] ) 50 50 ); 51 51 if ( $show_label && ! empty( $attributes['label'] ) ) { … … 53 53 '<label for="%1$s" class="wp-block-search__label">%2$s</label>', 54 54 $input_id, 55 $attributes['label']55 esc_html( $attributes['label'] ) 56 56 ); 57 57 } … … 62 62 '<input type="search" id="%s" class="wp-block-search__input %s" name="s" value="%s" placeholder="%s" %s required />', 63 63 $input_id, 64 $input_classes,64 esc_attr( $input_classes ), 65 65 esc_attr( get_search_query() ), 66 66 esc_attr( $attributes['placeholder'] ), … … 78 78 if ( ! $use_icon_button ) { 79 79 if ( ! empty( $attributes['buttonText'] ) ) { 80 $button_internal_markup = $attributes['buttonText'];80 $button_internal_markup = esc_html( $attributes['buttonText'] ); 81 81 } 82 82 } else { … … 90 90 $button_markup = sprintf( 91 91 '<button type="submit" class="wp-block-search__button %s" %s>%s</button>', 92 $button_classes,92 esc_attr( $button_classes ), 93 93 $inline_styles['button'], 94 94 $button_internal_markup … … 99 99 $field_markup = sprintf( 100 100 '<div class="wp-block-search__inside-wrapper %s" %s>%s</div>', 101 $field_markup_classes,101 esc_attr( $field_markup_classes ), 102 102 $inline_styles['wrapper'], 103 103 $input_markup . $button_markup … … 286 286 287 287 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 ) ) ) : '', 291 291 ); 292 292 }
Note: See TracChangeset
for help on using the changeset viewer.