[wp-trac] Re: [WordPress Trac] #2994: Theme files cannot be edited when theme's directory has brackets in it

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 2 05:32:58 GMT 2006


#2994: Theme files cannot be edited when theme's directory has brackets in it
----------------------------------+-----------------------------------------
 Reporter:  trasnam               |        Owner:  anonymous
     Type:  defect                |       Status:  new      
 Priority:  normal                |    Milestone:           
Component:  Administration        |      Version:  2.0.4    
 Severity:  normal                |   Resolution:           
 Keywords:  theme editor bracket  |  
----------------------------------+-----------------------------------------
Comment (by trasnam):

 As a note, I found out where the problem lies.

 Some code in wp-includes/pluggable-functions.php is the culprit.

 Starting on line 264 of the file, this code is what trips up the problem
 I'm having:


 {{{
 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);

 $strip = array('%0d', '%0a');
 $location = str_replace($strip, '', $location);
 }}}


 If the code from 2.0.3 is substituted, the code works as expected.
 Basically, replace those three lines of code with this one:


 {{{
 $location = str_replace( array("\n", "\r"), '', $location);
 }}}


 However, I think the code added to 2.0.4 was put there for a reason, so I
 doubt just putting back in the 2.0.3 code is a desired remedy.

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


More information about the wp-trac mailing list