HTMLPurifier cache settings, put stuff in subdir of get_sys_temp_dir()
This commit is contained in:
parent
cd978fa153
commit
747c91210f
@ -296,11 +296,15 @@ $default =
|
||||
array('handle' => false, // whether to handle sessions ourselves
|
||||
'debug' => false, // debugging output for sessions
|
||||
'gc_limit' => 1000), // max sessions to expire at a time
|
||||
'htmlfilter' => array( // purify HTML through HTMLPurifier
|
||||
'htmlfilter' => [ // remove tags from user/remotely generated HTML if they are === true
|
||||
'img' => true,
|
||||
'video' => true,
|
||||
'audio' => true,
|
||||
),
|
||||
],
|
||||
'htmlpurifier' => [ // configurable options for HTMLPurifier
|
||||
'Cache.DefinitionImpl' => 'Serializer',
|
||||
'Cache.SerializerPath' => implode(DIRECTORY_SEPARATOR, [sys_get_temp_dir(), 'gnusocial']),
|
||||
],
|
||||
'notice' =>
|
||||
array('contentlimit' => null,
|
||||
'allowprivate' => false, // whether to allow users to "check the padlock" to publish notices available for their subscribers.
|
||||
|
@ -600,6 +600,9 @@ function common_purify($html, array $args=array())
|
||||
$cfg->set('URI.Base', $args['URI.Base']); // if null this is like unsetting it I presume
|
||||
$cfg->set('URI.MakeAbsolute', !is_null($args['URI.Base'])); // if we have a URI base, convert relative URLs to absolute ones.
|
||||
}
|
||||
foreach (common_config('htmlpurifier') as $key=>$val) {
|
||||
$cfg->set($key, $val);
|
||||
}
|
||||
|
||||
// Remove more elements than what the default filter removes, default in GNU social are remotely
|
||||
// linked resources such as img, video, audio
|
||||
|
Loading…
Reference in New Issue
Block a user