From: jitendrapurohit Date: Tue, 19 Apr 2016 12:51:18 +0000 (+0530) Subject: CRM-18420 : Details field of a scheduled reminder contains raw HTML X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ee2eb45c585cbf111a4db1c4bd71c4f51bc47d3e;p=civicrm-core.git CRM-18420 : Details field of a scheduled reminder contains raw HTML --- diff --git a/Civi/Token/TokenRow.php b/Civi/Token/TokenRow.php index 55f509b723..439a138cdb 100644 --- a/Civi/Token/TokenRow.php +++ b/Civi/Token/TokenRow.php @@ -194,7 +194,15 @@ class TokenRow { foreach ($textTokens as $entity => $values) { foreach ($values as $field => $value) { if (!isset($htmlTokens[$entity][$field])) { - $htmlTokens[$entity][$field] = htmlentities($value); + // CRM-18420 - Activity Details Field are enclosed within

, + // hence if $body_text is empty, htmlentities will lead to + // conversion of these tags resulting in raw HTML. + if ($entity == 'activity' && $field == 'details') { + $htmlTokens[$entity][$field] = $value; + } + else { + $htmlTokens[$entity][$field] = htmlentities($value); + } } } }