Keep greedy regex's in control. fixes #4165

git-svn-id: https://develop.svn.wordpress.org/trunk@5630 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n
2007-06-02 00:02:06 +00:00
parent e6d32e8761
commit e2513b5643
3 changed files with 16 additions and 14 deletions
+6 -6
View File
@@ -73,12 +73,12 @@ function get_theme_data( $theme_file ) {
$theme_data = implode( '', file( $theme_file ) );
$theme_data = str_replace ( '\r', '\n', $theme_data );
preg_match( '|Theme Name:(.*)|i', $theme_data, $theme_name );
preg_match( '|Theme URI:(.*)|i', $theme_data, $theme_uri );
preg_match( '|Description:(.*)|i', $theme_data, $description );
preg_match( '|Author:(.*)|i', $theme_data, $author_name );
preg_match( '|Author URI:(.*)|i', $theme_data, $author_uri );
preg_match( '|Template:(.*)|i', $theme_data, $template );
preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name );
preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri );
preg_match( '|Description:(.*)$|mi', $theme_data, $description );
preg_match( '|Author:(.*)$|mi', $theme_data, $author_name );
preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri );
preg_match( '|Template:(.*)$|mi', $theme_data, $template );
if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) )
$version = wp_kses( trim( $version[1] ), $themes_allowed_tags );