From: Brian Shaughnessy Date: Mon, 13 Feb 2017 18:51:28 +0000 (-0500) Subject: CRM-20015 escape output before generating docx X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9931c84f33a80ae89dfcf41916aab846e4f4614e;p=civicrm-core.git CRM-20015 escape output before generating docx --- diff --git a/CRM/Utils/PDF/Document.php b/CRM/Utils/PDF/Document.php index ff98f858b7..0698b13944 100644 --- a/CRM/Utils/PDF/Document.php +++ b/CRM/Utils/PDF/Document.php @@ -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");