Make get_file_data() regex more precise. Fixes #15193

git-svn-id: http://svn.automattic.com/wordpress/trunk@16215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-05 22:22:28 +00:00
parent ce7f8c131c
commit a1d7b0f945
1 changed files with 1 additions and 1 deletions

View File

@ -4242,7 +4242,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
foreach ( $all_headers as $field => $regex ) {
preg_match( '/' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
preg_match( '/^[\s\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
if ( !empty( ${$field} ) )
${$field} = _cleanup_header_comment( ${$field}[1] );
else