From d5fbc8d61388b7c526f19aa112810ba9f6713e90 Mon Sep 17 00:00:00 2001 From: Genevieve-K <34507086+Genevieve-K@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:18:57 +0100 Subject: [PATCH] Fix Modal is not open after an error (#6677) With esc_url() escaping the redirect URL, special characters like & as preserved, and the modal window is not open. As for preview messages, I suggest using esc_url_raw(). --- includes/forms/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/forms/template.php b/includes/forms/template.php index 4ef4c73bcb..e8eea51c87 100644 --- a/includes/forms/template.php +++ b/includes/forms/template.php @@ -2421,7 +2421,7 @@ function give_redirect_and_popup_form( $redirect, $args ) { } // Return the modified URL. - return esc_url( $redirect ); + return esc_url_raw( $redirect ); } add_filter( 'give_send_back_to_checkout', 'give_redirect_and_popup_form', 10, 2 );