From: Thomas Schüttler Date: Fri, 4 Jan 2019 10:57:27 +0000 (+0100) Subject: Replace invalid characters in bounce reason with unicode replacement character X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=212eb1a89882704122ad4ba96fd41b61828c5f03;p=civicrm-core.git Replace invalid characters in bounce reason with unicode replacement character --- diff --git a/CRM/Mailing/Event/BAO/Bounce.php b/CRM/Mailing/Event/BAO/Bounce.php index 068693fdaf..a3f5af0062 100644 --- a/CRM/Mailing/Event/BAO/Bounce.php +++ b/CRM/Mailing/Event/BAO/Bounce.php @@ -77,6 +77,9 @@ class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce { } } + // replace any invalid unicode characters with replacement characters + $params['bounce_reason'] = mb_convert_encoding($params['bounce_reason'], 'UTF-8', 'UTF-8'); + // CRM-11989 $params['bounce_reason'] = mb_strcut($params['bounce_reason'], 0, 254);