WordPress.org

Make WordPress Core

Changeset 8486


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/theme.php

    r8301 r8486  
    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.