Changeset 8252

Show
Ignore:
Timestamp:
07/03/08 23:10:28 (2 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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    }