We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b65721 commit 1ed3533Copy full SHA for 1ed3533
1 file changed
lib/experimental/content-types/index.php
@@ -174,9 +174,10 @@ function gutenberg_filter_user_taxonomy_post_content( $data ) {
174
175
$decoded = json_decode( wp_unslash( (string) $data['post_content'] ), true );
176
if ( JSON_ERROR_NONE !== json_last_error() || ! is_array( $decoded ) ) {
177
- // Invalid JSON: store empty content so raw bytes can't leak.
178
- $data['post_content'] = '';
179
- return $data;
+ // Hedge: invalid JSON falls through to a canonical empty payload so
+ // a stray read path can't surface arbitrary bytes. The marker is
+ // added below, keeping the stored shape uniform.
180
+ $decoded = array();
181
}
182
183
$clean = gutenberg_user_taxonomy_sanitize_config( $decoded );
0 commit comments