]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
set the html sanitizer cache directory to ['cache']['dir'] from the config file;
[quix0rs-gnu-social.git] / lib / util.php
index 62db64d82873a335ab8f8877529f5d516f760948..9c32d7443303252c03a1aaa22b7a6676f3c2015d 100644 (file)
@@ -597,6 +597,9 @@ function common_purify($html)
     $cfg->set('Attr.AllowedRel', ['bookmark', 'directory', 'enclosure', 'home', 'license', 'nofollow', 'payment', 'tag']);  // http://microformats.org/wiki/rel
     $cfg->set('HTML.ForbiddenAttributes', array('style'));  // id, on* etc. are already filtered by default
     $cfg->set('URI.AllowedSchemes', array_fill_keys(common_url_schemes(), true));
+    if (common_config('cache', 'dir')) {
+        $cfg->set('Cache.SerializerPath', common_config('cache', 'dir'));
+    }
 
     // Remove more elements than what the default filter removes, default in GNU social are remotely
     // linked resources such as img, video, audio