Use wp_safe_redirect(). No need to allow offsite redirects.
git-svn-id: https://develop.svn.wordpress.org/trunk@20425 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c3a7874f33
commit
1daab2358b
@ -95,5 +95,5 @@ do_action('set_comment_cookies', $comment, $user);
|
|||||||
$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
|
$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
|
||||||
$location = apply_filters('comment_post_redirect', $location, $comment);
|
$location = apply_filters('comment_post_redirect', $location, $comment);
|
||||||
|
|
||||||
wp_redirect($location);
|
wp_safe_redirect( $location );
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user