[wp-trac] [WordPress Trac] #47858: Incorrect redirect after deleting a term from a taxonomy of a custom post type

WordPress Trac noreply at wordpress.org
Sat Aug 10 00:45:48 UTC 2019


#47858: Incorrect redirect after deleting a term from a taxonomy of a custom post
type
--------------------------+------------------------------
 Reporter:  johnbillion   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+------------------------------
Changes (by donmhico):

 * keywords:  needs-patch => has-patch


Comment:

 Nice find @johnbillion. I can't believe we've missed this up until now.

 In my attached patch,
 [https://core.trac.wordpress.org/attachment/ticket/47858/47858.diff
 47858.diff], you'll notice that I removed `esc_url()` in
 {{{#!php
 wp_redirect( $sendback );
 }}}

 This is because `esc_url()` will transform `&` to `&` which is not
 what we wanted in our url query args. Also, the base url is defined as
 `$sendback = admin_url( 'edit-tags.php' );` and the url query args are
 added using `add_query_arg()` so I think it's safe to remove the
 `esc_url()`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47858#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list