3

I have a mailing template with this snippet:

Trouble seeing this email? <a href="{mailing.viewUrl}">Read in your browser</a>.

In previous versions of CiviCRM, the token would render correctly.

In 4.6.2 and 4.6.3, the token renders, but elements of it are HTML-escaped. More importantly, the quotation marks surrounding the token are HTML-escaped:

Trouble seeing this email? <a href=&quot;http://mysite.org/civicrm/mailing/view?reset=1&amp;id=6&quot;>Read in your browser</a>.

My workaround has been to add a space between the quotation mark and token, which renders correctly:

Trouble seeing this email? <a href=" http://mysite.org/civicrm/mailing/view?reset=1&id=7 ">Read in your browser</a>.

Has anyone else seen this behavior? I can't send mailings from the demo server, and setting up my dev environment to send e-mails would be a serious pain, so I wanted to check in with the community before reporting it on issues.civicrm.org. My guess is that some of you have already got e-mails sitting in your inbox that you can test by clicking a link.

3

in CiviCRM 4.6.2 you can patch this issue with the following edit:

--- a/a/civicrm-core/CRM/Mailing/BAO/Mailing.php
+++ b/b/civicrm-core/CRM/Mailing/BAO/Mailing.php
@@ -1472,7 +1472,7 @@ ORDER BY   civicrm_email.is_bulkmail DESC
       if ($this->url_tracking) {
         $data = CRM_Mailing_BAO_TrackableURL::getTrackerURL($token, $this->id, $event_queue_id);
         if (!empty($html)) {
-          $data = htmlentities($data);
+          $data = htmlentities($data, ENT_NOQUOTES);
         }
       }
       else {
2

I actually found another 4.6.3 site that exhibited identical behavior, so I filed an issue: https://issues.civicrm.org/jira/browse/CRM-16634

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.