Make WordPress Core


Ignore:
Timestamp:
11/05/2010 10:22:28 PM (14 years ago)
Author:
scribu
Message:

Make get_file_data() regex more precise. Fixes #15193

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r16203 r16215  
    42434243
    42444244    foreach ( $all_headers as $field => $regex ) {
    4245         preg_match( '/' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
     4245        preg_match( '/^[\s\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
    42464246        if ( !empty( ${$field} ) )
    42474247            ${$field} = _cleanup_header_comment( ${$field}[1] );
Note: See TracChangeset for help on using the changeset viewer.