Merge pull request #14339 from rellect/cart_escape_attr

Escape attributes in cart.php
This commit is contained in:
Claudio Sanches 2017-04-13 12:20:56 -03:00 committed by GitHub
commit f2dc15d09b
1 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ do_action( 'woocommerce_before_cart' ); ?>
?> ?>
</td> </td>
<td class="product-name" data-title="<?php _e( 'Product', 'woocommerce' ); ?>"> <td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
<?php <?php
if ( ! $product_permalink ) { if ( ! $product_permalink ) {
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;'; echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;';
@ -93,13 +93,13 @@ do_action( 'woocommerce_before_cart' ); ?>
?> ?>
</td> </td>
<td class="product-price" data-title="<?php _e( 'Price', 'woocommerce' ); ?>"> <td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
<?php <?php
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
?> ?>
</td> </td>
<td class="product-quantity" data-title="<?php _e( 'Quantity', 'woocommerce' ); ?>"> <td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
<?php <?php
if ( $_product->is_sold_individually() ) { if ( $_product->is_sold_individually() ) {
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key ); $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
@ -116,7 +116,7 @@ do_action( 'woocommerce_before_cart' ); ?>
?> ?>
</td> </td>
<td class="product-subtotal" data-title="<?php _e( 'Total', 'woocommerce' ); ?>"> <td class="product-subtotal" data-title="<?php esc_attr_e( 'Total', 'woocommerce' ); ?>">
<?php <?php
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key );
?> ?>