CRM-20206 Use existing function to replace ampersand codes
authorJKingsnorth <john@johnkingsnorth.co.uk>
Thu, 2 Mar 2017 13:49:44 +0000 (13:49 +0000)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Thu, 2 Mar 2017 13:49:44 +0000 (13:49 +0000)
CRM/Mailing/BAO/Mailing.php

index 35eeaf095bea15bf3d538a5de769a6f2c4037613..ce27dd433b400ebdd57f9bee77dd86d9bd9c1f03 100644 (file)
@@ -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('&amp;', '&', $data);
+        $data = CRM_Utils_String::unstupifyUrl($data);
       }
     }
     elseif ($type == 'url') {