From 23bf79b211902e1bfa07dd5d182c59314352be9c Mon Sep 17 00:00:00 2001 From: JKingsnorth Date: Thu, 2 Mar 2017 12:19:07 +0000 Subject: [PATCH] CRM-20206 Fix encoding in plain text checksum links --- CRM/Mailing/BAO/Mailing.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index d746b5abc8..35eeaf095b 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1469,7 +1469,7 @@ ORDER BY civicrm_email.is_bulkmail DESC if ($type == 'embedded_url') { $embed_data = array(); foreach ($token as $t) { - $embed_data[] = $this->getTokenData($t, $html = FALSE, $contact, $verp, $urls, $event_queue_id); + $embed_data[] = $this->getTokenData($t, $html, $contact, $verp, $urls, $event_queue_id); } $numSlices = count($embed_data); $url = ''; @@ -1488,6 +1488,9 @@ ORDER BY civicrm_email.is_bulkmail DESC $url .= '"'; } $data = $url; + if (empty($html)) { + $data = str_replace('&', '&', $data); + } } elseif ($type == 'url') { if ($this->url_tracking) { -- 2.25.1