From f5942a0a736f6b591f878ffafb4e0c0538fea074 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 20 Mar 2009 00:30:32 +0000 Subject: [PATCH] Less confusing regex, props filosofo, fixes #9244 git-svn-id: https://develop.svn.wordpress.org/trunk@10824 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 22e46bc876..5237fcdd5b 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -849,7 +849,7 @@ 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']); if ( validate_file($_GET['template']) ) return; @@ -857,7 +857,7 @@ function preview_theme() { 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']); if ( validate_file($_GET['stylesheet']) ) return; add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );