Make WordPress Core

Ticket #58831: 58831-add-missing-escape.patch

File 58831-add-missing-escape.patch, 569 bytes (added by viralsampat, 3 months ago)
  • src/wp-admin/export.php

    diff --git src/wp-admin/export.php src/wp-admin/export.php
    index e073a24f29..1955f2b42e 100644
    function export_date_options( $post_type = 'post' ) { 
    160160                }
    161161
    162162                $month = zeroise( $date->month, 2 );
    163                 echo '<option value="' . $date->year . '-' . $month . '">' . $wp_locale->get_month( $month ) . ' ' . $date->year . '</option>';
     163                echo '<option value="' . esc_attr( $date->year ) . '-' . esc_attr( $month ) . '">' . $wp_locale->get_month( $month ) . ' ' . $date->year . '</option>';
    164164        }
    165165}
    166166?>