diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 72446ae744..9a4d86238c 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -444,7 +444,7 @@ protected function fixBrokenMacros($documentPart) $fixedDocumentPart = $documentPart; $fixedDocumentPart = preg_replace_callback( - '|\$[^{]*\{[^}]*\}|U', + '|\$(?:<[^{]*)?\{[^}]*\}|U', function ($match) { return strip_tags($match[0]); },