Merge pull request #27465 from woocommerce/revert-26885-fix/26780

Revert "Fixed HTML entities in product name not showing correctly in cart page"
This commit is contained in:
Néstor Soriano 2020-08-25 14:49:48 +02:00 committed by GitHub
commit 4d7741c329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 11 deletions

View File

@ -11,8 +11,8 @@
* the readme will list any important changes. * the readme will list any important changes.
* *
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates * @package WooCommerce/Templates
* @version 4.4.0 * @version 3.8.0
*/ */
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
@ -77,9 +77,9 @@ do_action( 'woocommerce_before_cart' ); ?>
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>"> <td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
<?php <?php
if ( ! $product_permalink ) { if ( ! $product_permalink ) {
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', esc_html( $_product->get_name() ), $cart_item, $cart_item_key ) . '&nbsp;' ); echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;' );
} else { } else {
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), esc_html( $_product->get_name() ) ), $cart_item, $cart_item_key ) ); echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
} }
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key ); do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );

View File

@ -11,15 +11,12 @@
* the readme will list any important changes. * the readme will list any important changes.
* *
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates * @package WooCommerce/Templates
* @version 4.4.0 * @version 1.6.4
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly. exit; // Exit if accessed directly.
} }
?> the_title( '<h1 class="product_title entry-title">', '</h1>' );
<h1 class="product_title entry-title">
<?php echo esc_html( get_the_title() ); ?>
</h1>