From a87080c2d1ee31c8a19723bc2b896d49ea1c8363 Mon Sep 17 00:00:00 2001 From: Tom Cafferkey Date: Thu, 4 May 2023 10:02:46 +0100 Subject: [PATCH] Remove esc_url() on self generated link to edit the Mini Cart template since it gets escaped in JS (#9348) --- src/BlockTypes/MiniCart.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/BlockTypes/MiniCart.php b/src/BlockTypes/MiniCart.php index ea674438ff5..88e6c81ffab 100644 --- a/src/BlockTypes/MiniCart.php +++ b/src/BlockTypes/MiniCart.php @@ -181,14 +181,12 @@ protected function enqueue_data( array $attributes = [] ) { ); } - $template_part_edit_uri = esc_url( - add_query_arg( - array( - 'postId' => sprintf( '%s//%s', $theme_slug, 'mini-cart' ), - 'postType' => 'wp_template_part', - ), - $site_editor_uri - ) + $template_part_edit_uri = add_query_arg( + array( + 'postId' => sprintf( '%s//%s', $theme_slug, 'mini-cart' ), + 'postType' => 'wp_template_part', + ), + $site_editor_uri ); }