Make WordPress Core

Ticket #58131: archives.patch

File archives.patch, 1.0 KB (added by utsav72640, 3 years ago)

Escaping function missing in wp-includes/blocks/archives.php file.

  • wp-includes/blocks/archives.php

    diff --git a/wp-includes/blocks/archives.php b/wp-includes/blocks/archives.php
    index 695affde76..59a589162d 100644
    a b function render_block_core_archives( $attributes ) {  
    6363
    6464                $show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
    6565
    66                 $block_content = '<label for="' . $dropdown_id . '" class="wp-block-archives__label' . $show_label . '">' . esc_html( $title ) . '</label>
    67                 <select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
     66                $block_content = '<label for="' . esc_attr( $dropdown_id ) . '" class="wp-block-archives__label' . esc_attr( $show_label ) . '">' . esc_html( $title ) . '</label>
     67                <select id="' . esc_attr( $dropdown_id ) . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
    6868                <option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
    6969
    7070                return sprintf(