From 43e0759fe5baa0a2e34da730769844cd062cce38 Mon Sep 17 00:00:00 2001 From: Richard van Oosterhout Date: Thu, 15 Feb 2018 14:43:43 +0100 Subject: [PATCH] CRM-21768_NOFOLLOW_links_in_public_online_view_of_mailings --- CRM/Mailing/BAO/TrackableURL.php | 2 +- tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Mailing/BAO/TrackableURL.php b/CRM/Mailing/BAO/TrackableURL.php index 6d563f3ee246..b1e40d7009a0 100644 --- a/CRM/Mailing/BAO/TrackableURL.php +++ b/CRM/Mailing/BAO/TrackableURL.php @@ -97,7 +97,7 @@ public static function getTrackerURL($url, $mailing_id, $queue_id) { $returnUrl = "{$urlCache[$mailing_id . $url]}&qid={$queue_id}"; if ($hrefExists) { - $returnUrl = "href='{$returnUrl}'"; + $returnUrl = "href='{$returnUrl}' rel='nofollow'"; } return $returnUrl; diff --git a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php index 81d60b46d6a8..fa841ab14db4 100644 --- a/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php +++ b/tests/phpunit/CRM/Mailing/BaseMailingSystemTest.php @@ -207,7 +207,7 @@ public function testHtmlWithOpenAndUrlTracking() { $this->assertRegExp( ";" . // body_html - "

You can go to Google" . + "

You can go to Google" . " or opt out.

\n" . // Default footer "Sample Footer for HTML formatted content" .