PluginProbe
Gutenberg / 17.0.2
Gutenberg v17.0.2
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/experimental/kses.php +2 -23 23.7.0 → 17.0.2 View file →
@@ -30,18 +30,12 @@
30 30 $decoded_data['isGlobalStylesUserThemeJSON']
31 31 ) {
32 32 unset( $decoded_data['isGlobalStylesUserThemeJSON'] );
33 33
34 - $data_to_encode = WP_Theme_JSON_Gutenberg::remove_insecure_properties( $decoded_data, 'custom' );
34 + $data_to_encode = WP_Theme_JSON_Gutenberg::remove_insecure_properties( $decoded_data );
35 35
36 36 $data_to_encode['isGlobalStylesUserThemeJSON'] = true;
37 - /**
38 - * JSON encode the data stored in post content.
39 - * Escape characters that are likely to be mangled by HTML filters: "<>&".
40 - *
41 - * This matches the escaping in {@see WP_REST_Global_Styles_Controller_Gutenberg::prepare_item_for_database()}.
42 - */
43 - return wp_slash( wp_json_encode( $data_to_encode, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP ) );
37 + return wp_slash( wp_json_encode( $data_to_encode ) );
44 38 }
45 39 return $data;
46 40 }
47 41
@@ -80,9 +74,8 @@
80 74 * This function should not be backported to core.
81 75 *
82 76 * @param bool $allow_css Whether the CSS is allowed.
83 77 * @param string $css_test_string The CSS to test.
84 - * @return bool Whether the CSS is allowed.
85 78 */
86 79 function allow_filter_in_styles( $allow_css, $css_test_string ) {
87 80 if ( preg_match(
88 81 "/^filter:\s*url\((['\"]?)#wp-duotone-[-a-zA-Z0-9]+\\1\)(\s+!important)?$/",
@@ -93,18 +86,4 @@
93 86 return $allow_css;
94 87 }
95 88 }
96 89 add_filter( 'safecss_filter_attr_allow_css', 'allow_filter_in_styles', 10, 2 );
97 -
98 -/**
99 - * Update allowed inline style attributes list.
100 - *
101 - * @param string[] $attrs Array of allowed CSS attributes.
102 - * @return string[] CSS attributes.
103 - */
104 -function gutenberg_safe_grid_attrs( $attrs ) {
105 - $attrs[] = 'grid-column';
106 - $attrs[] = 'grid-row';
107 - $attrs[] = 'container-type';
108 - return $attrs;
109 -}
110 -add_filter( 'safe_style_css', 'gutenberg_safe_grid_attrs' );