From: JKingsnorth Date: Thu, 2 Mar 2017 13:49:44 +0000 (+0000) Subject: CRM-20206 Use existing function to replace ampersand codes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bf0578405714a73cb7244afc869e62b8a120fc0c;p=civicrm-core.git CRM-20206 Use existing function to replace ampersand codes --- diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 35eeaf095b..ce27dd433b 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1488,8 +1488,9 @@ ORDER BY civicrm_email.is_bulkmail DESC $url .= '"'; } $data = $url; + // CRM-20206 Fix ampersand encoding in plain text emails if (empty($html)) { - $data = str_replace('&', '&', $data); + $data = CRM_Utils_String::unstupifyUrl($data); } } elseif ($type == 'url') {