Make WordPress Core


Ignore:
Timestamp:
07/29/2008 05:03:00 PM (16 years ago)
Author:
ryan
Message:

Allow dots in theme dirs when previewing. fixes #7482 for trunk

File:
1 edited

Legend:

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

    r8301 r8485  
    487487        return;
    488488
    489     $_GET[template] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[template]);
     489    $_GET[template] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[template]);
     490
     491    if ( validate_file($_GET[template]) )
     492        return;
    490493
    491494    add_filter('template', create_function('', "return '$_GET[template]';") );
    492495
    493496    if ( isset($_GET['stylesheet']) ) {
    494         $_GET[stylesheet] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[stylesheet]);
     497        $_GET[stylesheet] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[stylesheet]);
     498        if ( validate_file($_GET[stylesheet]) )
     499            return;
    495500        add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
    496501    }
Note: See TracChangeset for help on using the changeset viewer.