Make WordPress Core


Ignore:
Timestamp:
12/06/2010 08:49:54 PM (15 years ago)
Author:
nacin
Message:

Add AuthorName to get_plugins() and use it when deleting a plugin. fixes #15662.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r16660 r16757  
    118118    }
    119119
     120    $plugins_allowedtags = array(
     121        'a'       => array( 'href' => array(), 'title' => array() ),
     122        'abbr'    => array( 'title' => array() ),
     123        'acronym' => array( 'title' => array() ),
     124        'code'    => array(),
     125        'em'      => array(),
     126        'strong'  => array(),
     127    );
     128
     129    $plugin_data['AuthorName'] = $plugin_data['Author'] = wp_kses( $plugin_data['Author'], $plugins_allowedtags );
     130
    120131    //Apply Markup
    121132    if ( $markup ) {
     
    133144    }
    134145
    135     $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
    136 
    137     // Sanitize all displayed data
    138     $plugin_data['Title']       = wp_kses($plugin_data['Title'], $plugins_allowedtags);
    139     $plugin_data['Version']     = wp_kses($plugin_data['Version'], $plugins_allowedtags);
    140     $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags);
    141     $plugin_data['Author']      = wp_kses($plugin_data['Author'], $plugins_allowedtags);
     146    // Sanitize all displayed data. Author and AuthorName sanitized above.
     147    $plugin_data['Title']       = wp_kses( $plugin_data['Title'],       $plugins_allowedtags );
     148    $plugin_data['Version']     = wp_kses( $plugin_data['Version'],     $plugins_allowedtags );
     149    $plugin_data['Description'] = wp_kses( $plugin_data['Description'], $plugins_allowedtags );
    142150
    143151    return $plugin_data;
Note: See TracChangeset for help on using the changeset viewer.