Fix/escape add query arg template url (https://github.com/woocommerce/woocommerce-blocks/pull/9715)
* Escape postId for template part within MiniCart * Escape url * Change esc_url to esc_url_raw
This commit is contained in:
parent
dc6fa4a8c9
commit
24a293bde7
|
@ -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
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue