Merge pull request #21574 from woocommerce/fix/21505

Dont kses cart thumbnails
This commit is contained in:
Claudiu Lodromanean 2018-10-16 09:53:33 -07:00 committed by GitHub
commit 1ea5cea2f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -64,9 +64,9 @@ do_action( 'woocommerce_before_cart' ); ?>
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
if ( ! $product_permalink ) {
echo wp_kses_post( $thumbnail );
echo $thumbnail; // PHPCS: XSS ok.
} else {
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), wp_kses_post( $thumbnail ) );
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
}
?>
</td>