Fixes for encoded entities

This commit is contained in:
David Bomba 2023-09-21 20:44:16 +10:00
parent cfb20182fb
commit 76446c9402
4 changed files with 8 additions and 4 deletions

View File

@ -68,7 +68,7 @@ class Design extends BaseModel
'name',
'design',
'is_active',
'is_template',
// 'is_template',
];
public function company()

View File

@ -85,7 +85,11 @@ class PdfMaker
$loader = new \Twig\Loader\FilesystemLoader(storage_path());
$twig = new \Twig\Environment($loader);
$template = $twig->createTemplate($template);
$string_extension = new \Twig\Extension\StringLoaderExtension();
$twig->addExtension($string_extension);
$template = $twig->createTemplate(html_entity_decode($template));
$template = $template->render($this->options);
$f = $this->document->createDocumentFragment();

View File

@ -94,7 +94,7 @@
"symfony/mailgun-mailer": "^6.1",
"symfony/postmark-mailer": "^6.1",
"turbo124/beacon": "^1.5",
"twig/twig": "^3.0",
"twig/twig": "^3",
"twilio/sdk": "^6.40",
"webpatser/laravel-countries": "dev-master#75992ad",
"wepay/php-sdk": "^0.3",

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a3cef8412df6b0cc9371807991ab699a",
"content-hash": "08bc4729962b495b68162a069269f74f",
"packages": [
{
"name": "adrienrn/php-mimetyper",