Changeset 4035

Show
Ignore:
Timestamp:
07/23/06 19:20:11 (2 years ago)
Author:
ryan
Message:

Trim theme and plugin data. fixes #2943

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r4017 r4035  
    16131613    preg_match("|Author URI:(.*)|i", $plugin_data, $author_uri); 
    16141614    if (preg_match("|Version:(.*)|i", $plugin_data, $version)) 
    1615         $version = $version[1]
     1615        $version = trim($version[1])
    16161616    else 
    16171617        $version = ''; 
    16181618 
    1619     $description = wptexturize($description[1]); 
     1619    $description = wptexturize(trim($description[1])); 
    16201620 
    16211621    $name = $plugin_name[1]; 
     
    16231623    $plugin = $name; 
    16241624    if ('' != $plugin_uri[1] && '' != $name) { 
    1625         $plugin = '<a href="'.$plugin_uri[1].'" title="'.__('Visit plugin homepage').'">'.$plugin.'</a>'; 
     1625        $plugin = '<a href="' . trim($plugin_uri[1]) . '" title="'.__('Visit plugin homepage').'">'.$plugin.'</a>'; 
    16261626    } 
    16271627 
    16281628    if ('' == $author_uri[1]) { 
    1629         $author = $author_name[1]
    1630     } else { 
    1631         $author = '<a href="'.$author_uri[1].'" title="'.__('Visit author homepage').'">'.$author_name[1].'</a>'; 
     1629        $author = trim($author_name[1])
     1630    } else { 
     1631        $author = '<a href="' . trim($author_uri[1]) . '" title="'.__('Visit author homepage').'">' . trim($author_name[1]) . '</a>'; 
    16321632    } 
    16331633 
  • trunk/wp-includes/theme.php

    r4024 r4035  
    5151    preg_match("|Template:(.*)|i", $theme_data, $template); 
    5252    if ( preg_match("|Version:(.*)|i", $theme_data, $version) ) 
    53         $version = $version[1]
     53        $version = trim($version[1])
    5454    else 
    5555        $version =''; 
    5656    if ( preg_match("|Status:(.*)|i", $theme_data, $status) ) 
    57         $status = $status[1]
    58     else 
    59         $status ='publish'; 
    60  
    61     $description = wptexturize($description[1]); 
     57        $status = trim($status[1])
     58    else 
     59        $status = 'publish'; 
     60 
     61    $description = wptexturize(trim($description[1])); 
    6262 
    6363    $name = $theme_name[1]; 
     
    6666 
    6767    if ( '' == $author_uri[1] ) { 
    68         $author = $author_name[1]
     68        $author = trim($author_name[1])
    6969    } else { 
    70         $author = '<a href="' . $author_uri[1] . '" title="' . __('Visit author homepage') . '">' . $author_name[1] . '</a>'; 
     70        $author = '<a href="' . trim($author_uri[1]) . '" title="' . __('Visit author homepage') . '">' . trim($author_name[1]) . '</a>'; 
    7171    } 
    7272