Merge pull request #21574 from woocommerce/fix/21505
Dont kses cart thumbnails
This commit is contained in:
commit
1ea5cea2f8
|
@ -64,9 +64,9 @@ do_action( 'woocommerce_before_cart' ); ?>
|
||||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||||
|
|
||||||
if ( ! $product_permalink ) {
|
if ( ! $product_permalink ) {
|
||||||
echo wp_kses_post( $thumbnail );
|
echo $thumbnail; // PHPCS: XSS ok.
|
||||||
} else {
|
} 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>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue