Make get_file_data() regex even more precise. Props hakre. See #15193

git-svn-id: https://develop.svn.wordpress.org/trunk@16552 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-11-23 19:37:31 +00:00
parent c37f65296a
commit 81e04a887e
1 changed files with 1 additions and 2 deletions

View File

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