Make WordPress Core


Ignore:
Timestamp:
06/02/2007 12:02:06 AM (18 years ago)
Author:
rob1n
Message:

Keep greedy regex's in control. fixes #4165

File:
1 edited

Legend:

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

    r5566 r5630  
    33function get_plugin_data( $plugin_file ) {
    44    $plugin_data = implode( '', file( $plugin_file ));
    5     preg_match( "|Plugin Name:(.*)|i", $plugin_data, $plugin_name );
    6     preg_match( "|Plugin URI:(.*)|i", $plugin_data, $plugin_uri );
    7     preg_match( "|Description:(.*)|i", $plugin_data, $description );
    8     preg_match( "|Author:(.*)|i", $plugin_data, $author_name );
    9     preg_match( "|Author URI:(.*)|i", $plugin_data, $author_uri );
     5    preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $plugin_name );
     6    preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $plugin_uri );
     7    preg_match( '|Description:(.*)$|mi', $plugin_data, $description );
     8    preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name );
     9    preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri );
     10   
    1011    if ( preg_match( "|Version:(.*)|i", $plugin_data, $version ))
    1112        $version = trim( $version[1] );
Note: See TracChangeset for help on using the changeset viewer.