From 59beabd5dc55abd4263db8efed5ecfb9c88ef06e Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 3 Jul 2008 23:10:28 +0000 Subject: [PATCH] Allow underscore and dash in theme dirs when previewing. fixes #7236 git-svn-id: http://svn.automattic.com/wordpress/trunk@8252 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index dafc073382..aa5f385f36 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -486,12 +486,12 @@ function preview_theme() { if ( !current_user_can( 'switch_themes' ) ) return; - $_GET[template] = preg_replace('|[^a-z0-9]|i', '', $_GET[template]); + $_GET[template] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[template]); add_filter('template', create_function('', "return '$_GET[template]';") ); if ( isset($_GET['stylesheet']) ) { - $_GET[stylesheet] = preg_replace('|[^a-z0-9]|i', '', $_GET[stylesheet]); + $_GET[stylesheet] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[stylesheet]); add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") ); }