WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r8486 r8301  
    487487        return;
    488488
    489     $_GET[template] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[template]);
    490 
    491     if ( validate_file($_GET[template]) )
    492         return;
     489    $_GET[template] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[template]);
    493490
    494491    add_filter('template', create_function('', "return '$_GET[template]';") );
    495492
    496493    if ( isset($_GET['stylesheet']) ) {
    497         $_GET[stylesheet] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[stylesheet]);
    498         if ( validate_file($_GET[stylesheet]) )
    499             return;
     494        $_GET[stylesheet] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[stylesheet]);
    500495        add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
    501496    }
Note: See TracChangeset for help on using the changeset viewer.