diff --git a/includes/datatypes.php b/includes/datatypes.php index ef919e1..c35eea3 100644 --- a/includes/datatypes.php +++ b/includes/datatypes.php @@ -115,9 +115,14 @@ function register_meta() { 'post', 'podcast_transcript', array( - 'show_in_rest' => true, - 'type' => 'string', - 'single' => true, + 'show_in_rest' => true, + 'type' => 'string', + 'single' => true, + 'sanitize_callback' => function( $val ) { + return wp_kses_post( $val ); + }, + ) + ); \register_term_meta( 'podcasting_podcasts', diff --git a/templates/transcript.php b/templates/transcript.php index decbf8b..5d78f74 100644 --- a/templates/transcript.php +++ b/templates/transcript.php @@ -25,10 +25,8 @@ $podcast_slug = get_query_var( 'podcasting-episode' ); $post_object = get_page_by_path( $podcast_slug, OBJECT, 'post' ); if ( $post_object instanceof WP_Post ) { - echo wp_kses_post( - tenup_podcasting\transcripts\podcasting_wrap_unwrapped_text_in_paragraph( - get_post_meta( $post_object->ID, 'podcast_transcript', true ) - ) + echo tenup_podcasting\transcripts\podcasting_wrap_unwrapped_text_in_paragraph( // phpcs:ignore WordPress.Security.EscapeOutput + get_post_meta( $post_object->ID, 'podcast_transcript', true ) ); } ?>