Handle escaped curly bracket placeholders in rtf

This commit is contained in:
Nathan Gray 2015-04-29 21:40:12 +00:00
parent b0a8cebc69
commit 1ae125f08e

View File

@ -682,6 +682,12 @@ abstract class bo_merge
// agressivly removing all xml-tags eg. Word adds within placeholders
$content = preg_replace_callback('/{{[^}]+}}/i',create_function('$p','return \'$$\'.strip_tags(substr($p[0],2,-2)).\'$$\';'),$content);
// Handle escaped placeholder markers in RTF, they won't match when escaped
if($mimetype == 'application/rtf')
{
$content = preg_replace('/\\\{\\\{([^\\}]+)\\\}\\\}/i','$$\1$$',$content);
}
// make currently processed mimetype available to class methods;
$this->mimetype = $mimetype;