git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 3b5fabbe authored by nee's avatar nee

set the html sanitizer cache directory to ['cache']['dir'] from the config file;

parent 50f9f23f
...@@ -773,6 +773,13 @@ high: if you need high performance, or if you're seeing bad ...@@ -773,6 +773,13 @@ high: if you need high performance, or if you're seeing bad
performance, set this to true. It will turn off some high-intensity code from performance, set this to true. It will turn off some high-intensity code from
the site. the site.
cache
-----
dir: A string path to a writable directory that will be used as temporary cache
for some functions (currently just the HtmlSanitizer).
If it is not set, the GNU social installation directory will be used.
oldschool oldschool
--------- ---------
......
...@@ -597,6 +597,9 @@ function common_purify($html) ...@@ -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('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('HTML.ForbiddenAttributes', array('style')); // id, on* etc. are already filtered by default
$cfg->set('URI.AllowedSchemes', array_fill_keys(common_url_schemes(), true)); $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 // Remove more elements than what the default filter removes, default in GNU social are remotely
// linked resources such as img, video, audio // linked resources such as img, video, audio
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment