WordPress.org

Make WordPress Core

Ticket #51855: 51855.diff

File 51855.diff, 589 bytes (added by tnash, 3 months ago)

Patch for wp_dropdown_categories to use sanitize_html_class

  • src/wp-includes/category-template.php

     
    398398        $categories = get_terms( $get_terms_args );
    399399
    400400        $name     = esc_attr( $parsed_args['name'] );
    401         $class    = esc_attr( $parsed_args['class'] );
     401        $class    = sanitize_html_class( $parsed_args['class'] );
    402402        $id       = $parsed_args['id'] ? esc_attr( $parsed_args['id'] ) : $name;
    403403        $required = $parsed_args['required'] ? 'required' : '';
    404404