Skip to content

Commit

Permalink
esc_attr does not double encode
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Oct 7, 2015
1 parent 1a081a9 commit cf54ea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/single-product/add-to-cart/variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* as little as possible, but it does happen. When this occurs the version of the template file will
* be bumped and the readme will list any important changes.
*
* @see http://docs.woothemes.com/document/template-structure/
* @see http://docs.woothemes.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.5.0
Expand All @@ -24,7 +24,7 @@

do_action( 'woocommerce_before_add_to_cart_form' ); ?>

<form class="variations_form cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->id ); ?>" data-product_variations="<?php echo esc_attr( json_encode( $available_variations ) ) ?>">
<form class="variations_form cart" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->id ); ?>" data-product_variations="<?php echo htmlspecialchars( json_encode( $available_variations ) ) ?>">
<?php do_action( 'woocommerce_before_variations_form' ); ?>

<?php if ( empty( $available_variations ) && false !== $available_variations ) : ?>
Expand Down

0 comments on commit cf54ea8

Please sign in to comment.