Merge pull request #22593 from woocommerce/fix/22592

Do not escape wc_get_rating_html output
This commit is contained in:
Mike Jolley 2019-01-31 12:59:16 +00:00 committed by GitHub
commit 2cc5d279ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.5.2
* @version 3.5.5
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -29,15 +29,15 @@ if ( ! is_a( $product, 'WC_Product' ) ) {
<?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
<a href="<?php echo esc_url( $product->get_permalink() ); ?>">
<?php echo $product->get_image(); ?>
<?php echo $product->get_image(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span>
</a>
<?php if ( ! empty( $show_rating ) ) : ?>
<?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?>
<?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
<?php echo $product->get_price_html(); ?>
<?php echo $product->get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
</li>