Skip to content

Commit

Permalink
Merge pull request #264 from Automattic/fix/escape-redirect-urls
Browse files Browse the repository at this point in the history
Escape URLs for redirection
  • Loading branch information
nickdaugherty committed May 19, 2015
2 parents b2117fc + a428e2c commit 17721e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/class-coauthors-guest-authors.php
Expand Up @@ -201,7 +201,7 @@ function handle_create_guest_author_action() {
// Redirect to the edit Guest Author screen
$edit_link = get_edit_post_link( $post_id, 'redirect' );
$redirect_to = add_query_arg( 'message', 'guest-author-created', $edit_link );
wp_safe_redirect( $redirect_to );
wp_safe_redirect( esc_url_raw( $redirect_to ) );
exit;

}
Expand Down Expand Up @@ -272,7 +272,7 @@ function handle_delete_guest_author_action() {

// Redirect to safety
$redirect_to = add_query_arg( array_map( 'rawurlencode', $args ), admin_url( $this->parent_page ) );
wp_safe_redirect( $redirect_to );
wp_safe_redirect( esc_url_raw( $redirect_to ) );
exit;
}

Expand Down

0 comments on commit 17721e5

Please sign in to comment.