Skip to content

Commit

Permalink
Explicitly use ENT_COMPAT
Browse files Browse the repository at this point in the history
  • Loading branch information
tbradsha committed Dec 19, 2024
1 parent acad91c commit d265203
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions includes/class-modal-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ public static function order_button_text_with_price() {
/* translators: 1: Checkout button confirmation text. 2: Order total. */
__( '%1$s: %2$s', 'newspack-blocks' ),
self::get_modal_checkout_labels( 'checkout_confirm' ),
'<span class="cart-price">' . html_entity_decode( $total ) . '</span>'
'<span class="cart-price">' . html_entity_decode( $total, ENT_COMPAT ) . '</span>'
);
}

Expand All @@ -1538,7 +1538,7 @@ public static function get_cart_total_js() {
return;
}
$total = \wp_strip_all_tags( \wc_price( $cart->total ) );
echo esc_html( html_entity_decode( $total ) );
echo esc_html( html_entity_decode( $total, ENT_COMPAT ) );
wp_die();
}

Expand Down
2 changes: 1 addition & 1 deletion includes/class-newspack-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ public static function filter_excerpt( $attributes ) {
}

// Set excerpt length (https://core.trac.wordpress.org/ticket/29533#comment:3).
$excerpt = force_balance_tags( html_entity_decode( wp_trim_words( htmlentities( $excerpt ), $excerpt_length, static::more_excerpt() ) ) );
$excerpt = force_balance_tags( html_entity_decode( wp_trim_words( htmlentities( $excerpt, ENT_COMPAT ), $excerpt_length, static::more_excerpt(), ENT_COMPAT ) ) );

return $excerpt;
};
Expand Down

0 comments on commit d265203

Please sign in to comment.