Apply strip_tags to attributes in loop template

Fixes #19491
This commit is contained in:
Peter Fabian 2018-03-23 18:13:50 +01:00
parent 59231eeb85
commit a940c0bfca
1 changed files with 1 additions and 1 deletions

View File

@ -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 );