Browse files

Fix previewing of themes in subdirs. Props zedlander. fixes #8548 for…

… 2.7

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 9fa9078 commit 3fa855d06067d3cd4417ce087fbb662bf5c8f8d0 ryan committed Feb 2, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 wp-includes/theme.php
View
4 wp-includes/theme.php
@@ -849,15 +849,15 @@ 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;
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']}';") );

0 comments on commit 3fa855d

Please sign in to comment.