Skip to content

Commit

Permalink
Merge pull request civicrm#9917 from JKingsnorth/CRM-20206
Browse files Browse the repository at this point in the history
CRM-20206 Fix encoding in plain text checksum links
  • Loading branch information
eileenmcnaughton authored Mar 3, 2017
2 parents f0d6d42 + 23c625f commit f97b6b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ private function getTokenData(&$token_a, $html = FALSE, &$contact, &$verp, &$url
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 = '';
Expand All @@ -1488,6 +1488,10 @@ private function getTokenData(&$token_a, $html = FALSE, &$contact, &$verp, &$url
$url .= '"';
}
$data = $url;
// CRM-20206 Fix ampersand encoding in plain text emails
if (empty($html)) {
$data = CRM_Utils_String::unstupifyUrl($data);
}
}
elseif ($type == 'url') {
if ($this->url_tracking) {
Expand Down

0 comments on commit f97b6b1

Please sign in to comment.