Escape output in template functions

This commit is contained in:
Brian Miyaji
2021-11-06 19:08:25 +09:00
parent f07f42b5c9
commit 8be366b70d

View File

@@ -86,7 +86,7 @@ if ( ! function_exists( 'sportspress_taxonomy_archive_description' ) ) {
if ( is_tax( array( 'sp_season', 'sp_league', 'sp_venue', 'sp_position' ) ) && get_query_var( 'paged' ) == 0 ) {
$description = apply_filters( 'the_content', term_description() );
if ( $description ) {
echo '<div class="term-description">' . $description . '</div>';
echo '<div class="term-description">' . esc_html( $description ) . '</div>';
}
}
}