WordPress.org

Make WordPress Core

Ticket #18875: 18875.1.diff

File 18875.1.diff, 537 bytes (added by sbressler, 3 years ago)

Patch that sanitizes the title of the constructor args

  • wp-admin/includes/class-wp-list-table.php

     
    9191                if ( !$args['plural'] ) 
    9292                        $args['plural'] = $screen->base; 
    9393 
     94                // Sanitize the provided titles 
     95                $args['plural'] = sanitize_title( $args['plural'] ); 
     96                $args['singular'] = sanitize_title( $args['singular'] ); 
     97 
    9498                $this->_args = $args; 
    9599 
    96100                if ( $args['ajax'] ) {