Make WordPress Core

Ticket #2135: admin-functions.diff

File admin-functions.diff, 1.2 KB (added by Viper007Bond, 20 years ago)

get_plugin_data() trim() patch

  • wp-admin/admin-functions.php

     
    14851485        $name = trim($name);
    14861486        $plugin = $name;
    14871487        if ('' != $plugin_uri[1] && '' != $name) {
    1488                 $plugin = '<a href="'.$plugin_uri[1].'" title="'.__('Visit plugin homepage').'">'.$plugin.'</a>';
     1488                $plugin = '<a href="' . trim($plugin_uri[1]) . '" title="' . __('Visit plugin homepage') . '">' . $plugin . '</a>';
    14891489        }
    14901490
    14911491        if ('' == $author_uri[1]) {
    14921492                $author = $author_name[1];
    14931493        } else {
    1494                 $author = '<a href="'.$author_uri[1].'" title="'.__('Visit author homepage').'">'.$author_name[1].'</a>';
     1494                $author = '<a href="' . trim($author_uri[1]) . '" title="' . __('Visit author homepage'). '">' . $author_name[1] . '</a>';
    14951495        }
    14961496
    1497         return array ('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1]);
     1497        return array ('Name' => $name, 'Title' => $plugin, 'Description' => trim($description), 'Author' => trim($author), 'Version' => trim($version), 'Template' => $template[1]);
    14981498}
    14991499
    15001500function get_plugins() {