X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FString.php;h=eaae593b46e6551f6696784e259f9266479946e9;hb=b5a104e41f5250de860b532494fd869cbc5a61d5;hp=0079f9358c5e3dbe758d2e367db88d1f3eaec71c;hpb=6340311ffde8285b896e31b8dabf34d44d04df83;p=civicrm-core.git diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index 0079f9358c..eaae593b46 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -1,7 +1,7 @@ get_text(); + $token_html = preg_replace('!\{([a-z_.]+)\}!i', 'token:{$1}', $html); + $converter = new rcube_html2text($token_html); + $token_text = $converter->get_text(); + $text = preg_replace('!token\:\{([a-z_.]+)\}!i', '{$1}', $token_text); + return $text; } static function extractName($string, &$params) {