[wp-trac] [WordPress Trac] #9329: Theme preview not working

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 13 14:05:08 GMT 2009


#9329: Theme preview not working
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous
     Type:  defect (bug)       |      Status:  new      
 Priority:  high               |   Milestone:  2.7.2    
Component:  General            |     Version:  2.7.1    
 Severity:  major              |    Keywords:           
-------------------------------+--------------------------------------------
 I bumped into this odd bug, in preview_theme()

 {{{
 var_dump($_GET['template']); // foo-bar
         $_GET['template'] = preg_replace('|[^a-z0-9_.-/]|i', '',
 $_GET['template']);
 var_dump($_GET['template']);die; // foobar
 }}}


 Platform is Apache 2.2 with php 5.2.6 on Leopard. I had ran into the issue
 in plugins in the past, but never in WP. Basically, it treats .-/ like a
 range, and changing it to ./- fixes the thing.

 The fix is trivial, and is attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9329>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list