From 533378d98cf72e030747b9cab8f5e6b32ff73d58 Mon Sep 17 00:00:00 2001 From: guido Date: Sun, 14 Jul 2024 12:58:18 +0200 Subject: [PATCH] Introduce new auto escaping functions Add the following functions to the auto escaped functions - `get_block_wrapper_attributes` Render the block wrapper tag attributes - `wp_interactivity_data_wp_context` Render the interactivity json context value --- WordPress/Helpers/EscapingFunctionsTrait.php | 122 ++++++++++--------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/WordPress/Helpers/EscapingFunctionsTrait.php b/WordPress/Helpers/EscapingFunctionsTrait.php index 3df484ff6..92f8fa737 100644 --- a/WordPress/Helpers/EscapingFunctionsTrait.php +++ b/WordPress/Helpers/EscapingFunctionsTrait.php @@ -108,66 +108,68 @@ trait EscapingFunctionsTrait { * @var array */ private $autoEscapedFunctions = array( - 'allowed_tags' => true, - 'bloginfo' => true, - 'body_class' => true, - 'calendar_week_mod' => true, - 'category_description' => true, - 'checked' => true, - 'comment_class' => true, - 'count' => true, - 'disabled' => true, - 'do_shortcode' => true, - 'do_shortcode_tag' => true, - 'get_archives_link' => true, - 'get_attachment_link' => true, - 'get_avatar' => true, - 'get_bookmark_field' => true, - 'get_calendar' => true, - 'get_comment_author_link' => true, - 'get_current_blog_id' => true, - 'get_delete_post_link' => true, - 'get_search_form' => true, - 'get_search_query' => true, - 'get_the_author_link' => true, - 'get_the_author' => true, - 'get_the_date' => true, - 'get_the_ID' => true, - 'get_the_post_thumbnail' => true, - 'get_the_term_list' => true, - 'post_type_archive_title' => true, - 'readonly' => true, - 'selected' => true, - 'single_cat_title' => true, - 'single_month_title' => true, - 'single_post_title' => true, - 'single_tag_title' => true, - 'single_term_title' => true, - 'tag_description' => true, - 'term_description' => true, - 'the_author' => true, - 'the_date' => true, - 'the_title_attribute' => true, - 'walk_nav_menu_tree' => true, - 'wp_dropdown_categories' => true, - 'wp_dropdown_users' => true, - 'wp_generate_tag_cloud' => true, - 'wp_get_archives' => true, - 'wp_get_attachment_image' => true, - 'wp_get_attachment_link' => true, - 'wp_link_pages' => true, - 'wp_list_authors' => true, - 'wp_list_bookmarks' => true, - 'wp_list_categories' => true, - 'wp_list_comments' => true, - 'wp_login_form' => true, - 'wp_loginout' => true, - 'wp_nav_menu' => true, - 'wp_readonly' => true, - 'wp_register' => true, - 'wp_tag_cloud' => true, - 'wp_timezone_choice' => true, - 'wp_title' => true, + 'allowed_tags' => true, + 'bloginfo' => true, + 'body_class' => true, + 'calendar_week_mod' => true, + 'category_description' => true, + 'checked' => true, + 'comment_class' => true, + 'count' => true, + 'disabled' => true, + 'do_shortcode' => true, + 'do_shortcode_tag' => true, + 'get_archives_link' => true, + 'get_attachment_link' => true, + 'get_avatar' => true, + 'get_bookmark_field' => true, + 'get_calendar' => true, + 'get_comment_author_link' => true, + 'get_current_blog_id' => true, + 'get_delete_post_link' => true, + 'get_search_form' => true, + 'get_search_query' => true, + 'get_the_author_link' => true, + 'get_the_author' => true, + 'get_the_date' => true, + 'get_the_ID' => true, + 'get_the_post_thumbnail' => true, + 'get_the_term_list' => true, + 'post_type_archive_title' => true, + 'readonly' => true, + 'selected' => true, + 'single_cat_title' => true, + 'single_month_title' => true, + 'single_post_title' => true, + 'single_tag_title' => true, + 'single_term_title' => true, + 'tag_description' => true, + 'term_description' => true, + 'the_author' => true, + 'the_date' => true, + 'the_title_attribute' => true, + 'walk_nav_menu_tree' => true, + 'wp_dropdown_categories' => true, + 'wp_dropdown_users' => true, + 'wp_generate_tag_cloud' => true, + 'wp_get_archives' => true, + 'wp_get_attachment_image' => true, + 'wp_get_attachment_link' => true, + 'wp_link_pages' => true, + 'wp_list_authors' => true, + 'wp_list_bookmarks' => true, + 'wp_list_categories' => true, + 'wp_list_comments' => true, + 'wp_login_form' => true, + 'wp_loginout' => true, + 'wp_nav_menu' => true, + 'wp_readonly' => true, + 'wp_register' => true, + 'wp_tag_cloud' => true, + 'wp_timezone_choice' => true, + 'wp_title' => true, + 'get_block_wrapper_attributes' => true, + 'wp_interactivity_data_wp_context' => true ); /**