From 9458069abbf1204f8c04c01fbc9ffb898d5aac7a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 8 Sep 2021 07:05:53 +1000 Subject: [PATCH] Fixes for special character encoding --- app/Http/Middleware/QueryLogging.php | 2 +- app/PaymentDrivers/Stripe/CreditCard.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 647dc030f5ff..30b4adc32a0e 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -55,7 +55,7 @@ class QueryLogging // nlog("Query count = {$count}"); if($count > 175){ - nlog("Quer count = {$count}"); + nlog("Query count = {$count}"); nlog($queries); } diff --git a/app/PaymentDrivers/Stripe/CreditCard.php b/app/PaymentDrivers/Stripe/CreditCard.php index 43fd5eb47098..7d187185db9e 100644 --- a/app/PaymentDrivers/Stripe/CreditCard.php +++ b/app/PaymentDrivers/Stripe/CreditCard.php @@ -76,7 +76,8 @@ class CreditCard private function decodeUnicodeString($string) { - return iconv("UTF-8", "ISO-8859-1//TRANSLIT", $this->decode_encoded_utf8($string)); + return html_entity_decode($string, ENT_QUOTES, 'UTF-8'); + // return iconv("UTF-8", "ISO-8859-1//TRANSLIT", $this->decode_encoded_utf8($string)); } private function decode_encoded_utf8($string){