diff --git a/templates/loop/add-to-cart.php b/templates/loop/add-to-cart.php index 67182c69576..27c999956fc 100644 --- a/templates/loop/add-to-cart.php +++ b/templates/loop/add-to-cart.php @@ -27,7 +27,7 @@ echo apply_filters( 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok. esc_url( $product->add_to_cart_url() ), esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ), esc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ), - isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '', + isset( $args['attributes'] ) ? wc_implode_html_attributes( array_map( 'strip_tags', $args['attributes'] ) ) : '', esc_html( $product->add_to_cart_text() ) ), $product, $args );