* Escape postId for template part within MiniCart

* Escape  url

* Change esc_url to esc_url_raw
This commit is contained in:
Tom Cafferkey 2023-06-06 16:42:19 +01:00 committed by GitHub
parent dc6fa4a8c9
commit 24a293bde7
1 changed files with 8 additions and 6 deletions

View File

@ -181,12 +181,14 @@ class MiniCart extends AbstractBlock {
);
}
$template_part_edit_uri = add_query_arg(
array(
'postId' => sprintf( '%s//%s', $theme_slug, 'mini-cart' ),
'postType' => 'wp_template_part',
),
$site_editor_uri
$template_part_edit_uri = esc_url_raw(
add_query_arg(
array(
'postId' => sprintf( '%s//%s', $theme_slug, 'mini-cart' ),
'postType' => 'wp_template_part',
),
$site_editor_uri
)
);
}