Skip to content

Commit

Permalink
fix: use temp files dir for htmlpurify serializer path (#7476)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwaite committed Jun 15, 2024
1 parent c6ae41a commit 60dc0ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Services/DocumentTemplates/DocumentTemplateRender.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public function doRender($template_id, $template_content = null, $json_data = nu
// purify html (and remove js)
$isLegacy = stripos($template, 'portal_version') === false;
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', $GLOBALS['temporary_files_dir']);
$config->set('Core.Encoding', 'UTF-8');
$config->set('CSS.AllowedProperties', '*');
$purify = new HTMLPurifier($config);
Expand Down

0 comments on commit 60dc0ee

Please sign in to comment.