[wp-trac] [WordPress Trac] #13051: admin_url() and site_url() shouldn't need esc_url()

WordPress Trac wp-trac at lists.automattic.com
Mon May 3 18:10:02 UTC 2010


#13051: admin_url() and site_url() shouldn't need esc_url()
--------------------------+-------------------------------------------------
 Reporter:  alexkingorg   |       Owner:  ryan                     
     Type:  defect (bug)  |      Status:  new                      
 Priority:  normal        |   Milestone:  3.0                      
Component:  Security      |     Version:  3.0                      
 Severity:  normal        |    Keywords:  needs-testing needs-patch
--------------------------+-------------------------------------------------

Comment(by alexkingorg):

 Something seems odd here. In the example above:

 {{{http://example.com/wp-admin/edit.php#038;action=edit}}}

 That should be a question mark (?), not an ampersand. However the entity
 (#038;) is for an ampersand.

 When we reviewed the redirects, we saw that none of them actually used
 ampersands, though a dozen or so used question marks.

 Why would this:

 {{{wp_redirect( admin_url( 'edit.php?action=edit' ) );}}}

 result in a URL like this:

 {{{http://example.com/wp-admin/edit.php#038;action=edit}}}

 or, with the entity unencoded:

 {{{http://example.com/wp-admin/edit.php&action=edit}}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13051#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list