Escape outputs

This commit is contained in:
Brian Miyaji
2021-11-13 20:42:08 +09:00
parent 051d3e3055
commit 23ba2446b1
190 changed files with 2837 additions and 2837 deletions

View File

@@ -15,14 +15,14 @@ if ( ! isset( $id ) ) {
$id = get_the_ID();
}
$video_url = get_post_meta( $id, 'sp_video', true );
$video_url = esc_url( get_post_meta( $id, 'sp_video', true ) );
if ( $video_url ) :
?>
<div class="sp-template sp-template-event-video sp-event-video">
<h4 class="sp-table-caption"><?php _e( 'Video', 'sportspress' ); ?></h4>
<h4 class="sp-table-caption"><?php esc_attr_e( 'Video', 'sportspress' ); ?></h4>
<?php
global $wp_embed;
echo $wp_embed->autoembed( $video_url );
echo $wp_embed->autoembed( $video_url ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</div>
<?php