Merge pull request #17499 from woocommerce/fix/17492

Removed wp_kses_post() from product archive description
This commit is contained in:
Mike Jolley 2017-11-01 16:48:31 +00:00 committed by GitHub
commit bf4063b0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -695,8 +695,6 @@ if ( ! function_exists( 'woocommerce_product_archive_description' ) ) {
/** /**
* Show a shop page description on product archives. * Show a shop page description on product archives.
*
* @subpackage Archives
*/ */
function woocommerce_product_archive_description() { function woocommerce_product_archive_description() {
// Don't display the description on search results page. // Don't display the description on search results page.
@ -705,11 +703,11 @@ if ( ! function_exists( 'woocommerce_product_archive_description' ) ) {
} }
if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) { if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) {
$shop_page = get_post( wc_get_page_id( 'shop' ) ); $shop_page = get_post( wc_get_page_id( 'shop' ) );
if ( $shop_page ) { if ( $shop_page ) {
$description = wc_format_content( $shop_page->post_content ); $description = wc_format_content( $shop_page->post_content );
if ( $description ) { if ( $description ) {
echo '<div class="page-description">' . wp_kses_post( $description ) . '</div>'; echo '<div class="page-description">' . $description . '</div>'; // WPCS: XSS ok.
} }
} }
} }