CRM-20015 escape output before generating docx
authorBrian Shaughnessy <brian@lcdservices.biz>
Mon, 13 Feb 2017 18:51:28 +0000 (13:51 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Mon, 13 Feb 2017 18:51:28 +0000 (13:51 -0500)
CRM/Utils/PDF/Document.php

index ff98f858b7b0c2a2a17e6beebb75f8b8c439301b..0698b13944492691989a02b7bc1847784c7301e9 100644 (file)
@@ -115,6 +115,7 @@ class CRM_Utils_PDF_Document {
       $phpWord = \PhpOffice\PhpWord\IOFactory::load($fileName, $formats[$ext]);
     }
 
+    \PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true); //CRM-20015
     $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, $formats[$ext]);
 
     CRM_Utils_System::setHttpHeader('Content-Type', "application/$ext");