← All changes
|
includes/blocks/helpers/class-convertkit-block-post-helper.php
+6
-6
3.4.2
→
3.4.6
View file →
| @@ -134,13 +134,13 @@ | ||
| 134 | 134 | ++$occurrence_index; |
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - // Update Post. | |
| 138 | + // Update Post, slashing the content as wp_update_post() unslashes it. | |
| 139 | 139 | $result = wp_update_post( |
| 140 | 140 | array( |
| 141 | 141 | 'ID' => $post_id, |
| 142 | - 'post_content' => serialize_blocks( $blocks ), | |
| 142 | + 'post_content' => wp_slash( serialize_blocks( $blocks ) ), | |
| 143 | 143 | ), |
| 144 | 144 | true |
| 145 | 145 | ); |
| 146 | 146 | |
| @@ -209,13 +209,13 @@ | ||
| 209 | 209 | sprintf( __( 'No occurrence #%2$d of block %1$s found in post %3$d.', 'convertkit' ), $block_name, (int) $occurrence_index, $post_id ) |
| 210 | 210 | ); |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - // Update Post. | |
| 213 | + // Update Post, slashing the content as wp_update_post() unslashes it. | |
| 214 | 214 | $result = wp_update_post( |
| 215 | 215 | array( |
| 216 | 216 | 'ID' => $post_id, |
| 217 | - 'post_content' => serialize_blocks( $blocks ), | |
| 217 | + 'post_content' => wp_slash( serialize_blocks( $blocks ) ), | |
| 218 | 218 | ), |
| 219 | 219 | true |
| 220 | 220 | ); |
| 221 | 221 | |
| @@ -284,13 +284,13 @@ | ||
| 284 | 284 | sprintf( __( 'No occurrence #%2$d of block %1$s found in post %3$d.', 'convertkit' ), $block_name, (int) $occurrence_index, $post_id ) |
| 285 | 285 | ); |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - // Update Post. | |
| 288 | + // Update Post, slashing the content as wp_update_post() unslashes it. | |
| 289 | 289 | $result = wp_update_post( |
| 290 | 290 | array( |
| 291 | 291 | 'ID' => $post_id, |
| 292 | - 'post_content' => serialize_blocks( $blocks ), | |
| 292 | + 'post_content' => wp_slash( serialize_blocks( $blocks ) ), | |
| 293 | 293 | ), |
| 294 | 294 | true |
| 295 | 295 | ); |
| 296 | 296 | |