htmlpurifier cache not writable #1627

This commit is contained in:
Hillel Coren 2017-08-20 10:15:19 +03:00
parent 3e60917999
commit 6f1948ae6b

View File

@ -22,6 +22,7 @@ class HTMLUtils
$config->set('CSS.AllowImportant', true);
$config->set('CSS.AllowTricky', true);
$config->set('CSS.Trusted', true);
$config->set('Cache.SerializerPath', base_path('storage/framework/cache'));
// Create a new purifier instance
$purifier = new HTMLPurifier($config);
@ -42,6 +43,8 @@ class HTMLUtils
$html = html_entity_decode($html);
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', base_path('storage/framework/cache'));
$purifier = new HTMLPurifier($config);
return $purifier->purify($html);