Make WordPress Core

Changeset 8252


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

Allow underscore and dash in theme dirs when previewing. fixes #7236

File:
1 edited

Legend:

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

    r8040 r8252  
    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]);
    490490
    491491    add_filter('template', create_function('', "return '$_GET[template]';") );
    492492
    493493    if ( isset($_GET['stylesheet']) ) {
    494         $_GET[stylesheet] = preg_replace('|[^a-z0-9]|i', '', $_GET[stylesheet]);
     494        $_GET[stylesheet] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[stylesheet]);
    495495        add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
    496496    }
Note: See TracChangeset for help on using the changeset viewer.