Skip to content

Commit db74f86

Browse files
committed
Enable output escaping in template processing
1 parent 4530e90 commit db74f86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/Helpers/Cetak.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Illuminate\Support\Facades\Storage;
2727
use Illuminate\Support\Str;
2828
use PhpOffice\PhpWord\Element\TextRun;
29+
use PhpOffice\PhpWord\Settings;
2930

3031
class Cetak
3132
{
@@ -81,6 +82,7 @@ public static function cetak($jenis, $models, $filename, $template_id, $tanggal
8182
*/
8283
public static function getTemplate(string $jenis, $id, $template_id, $tanggal, $pengelola)
8384
{
85+
Settings::setOutputEscapingEnabled(true);
8486
$templateProcessor = new TemplateProcessor(Helper::getTemplatePathById($template_id)['path']);
8587
if ($tanggal || $pengelola) {
8688
$data = call_user_func('App\Helpers\Cetak::'.$jenis, $id, $tanggal, $pengelola);

0 commit comments

Comments
 (0)