diff --git a/tests/integration/API/CacheableAPIBaseTest.php b/tests/integration/API/CacheableAPIBaseTest.php index 563060743..e8585ce61 100644 --- a/tests/integration/API/CacheableAPIBaseTest.php +++ b/tests/integration/API/CacheableAPIBaseTest.php @@ -267,7 +267,7 @@ public function provider_get_request_transient_key(): array { * * @throws ReflectionException */ - public function test_is_request_cacheable( bool $is_cacheable, $filter_value = null, bool $expected ) { + public function test_is_request_cacheable( bool $is_cacheable, $filter_value, bool $expected ) { $api = $this->get_new_api_instance_with_request( $this->get_new_request_instance( $is_cacheable ) ); @@ -313,7 +313,7 @@ public function provider_is_request_cacheable(): array { * * @throws ReflectionException */ - public function test_get_request_cache_lifetime( int $lifetime, $filter_value = null, int $expected ) { + public function test_get_request_cache_lifetime( int $lifetime, $filter_value, int $expected ) { $api = $this->get_new_api_instance_with_request( $this->get_new_request_instance()->set_cache_lifetime( $lifetime ) ); diff --git a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php index d0e22c024..e04f73921 100644 --- a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php +++ b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php @@ -410,7 +410,7 @@ public function ajax_process_capture() { } wp_send_json_success( [ - 'message' => html_entity_decode( wp_strip_all_tags( $result['message'] ) ), // ensure any HTML tags are removed and the currency symbol entity is decoded + 'message' => html_entity_decode( wp_strip_all_tags( $result['message'] ), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ), // ensure any HTML tags are removed and the currency symbol entity is decoded ] ); } catch ( SV_WC_Payment_Gateway_Exception $e ) {