diff --git src/wp-includes/theme.php src/wp-includes/theme.php
index a36fe79..c1c9c24 100644
--- src/wp-includes/theme.php
+++ src/wp-includes/theme.php
@@ -2549,7 +2549,7 @@ function _wp_customize_include() {
  * @param WP_Post $changeset_post Changeset post object.
  */
 function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_post ) {
-	global $wp_customize;
+	global $wp_customize, $wpdb;
 
 	$is_publishing_changeset = (
 		'customize_changeset' === $changeset_post->post_type
@@ -2600,7 +2600,16 @@ function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_p
 	 * and thus garbage collected.
 	 */
 	if ( ! wp_revisions_enabled( $changeset_post ) ) {
+		$has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) );
+		if ( $has_kses ) {
+			kses_remove_filters(); // Prevent KSES from corrupting JSON in post_content.
+		}
 		wp_trash_post( $changeset_post->ID );
+		if ( $has_kses ) {
+			kses_init_filters();
+		}
+		// @todo Remove '__trashed' suffix from post_name.
+		// @todo Should wp_trash_post() be used at all? Or should an approach like wp_publish_post() be used?
 	}
 }
 
