WordPress.org

Make WordPress Core

Changeset 16552


Ignore:
Timestamp:
11/23/10 19:37:31 (6 years ago)
Author:
scribu
Message:

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

File:
1 edited

Legend:

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

    r16469 r16552  
    42384238    } 
    42394239 
    4240  
    42414240    foreach ( $all_headers as $field => $regex ) { 
    4242         preg_match( '/^[\s\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field}); 
     4241        preg_match( '/^[ \t\/*#]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field}); 
    42434242        if ( !empty( ${$field} ) ) 
    42444243            ${$field} = _cleanup_header_comment( ${$field}[1] ); 
Note: See TracChangeset for help on using the changeset viewer.