From ee2eb45c585cbf111a4db1c4bd71c4f51bc47d3e Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 19 Apr 2016 18:21:18 +0530 Subject: [PATCH] CRM-18420 : Details field of a scheduled reminder contains raw HTML --- Civi/Token/TokenRow.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); + } } } } -- 2.25.1