mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
take care that charset and tempdir have appropriate values, no matter if they are initialized at the time
This commit is contained in:
parent
0e646e28c8
commit
d228a33ff1
@ -1274,7 +1274,7 @@ class html
|
|||||||
if (is_null($config))
|
if (is_null($config))
|
||||||
{
|
{
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$config->set('Core', 'Encoding', self::$charset);
|
$config->set('Core', 'Encoding', (self::$charset?self::$charset:'UTF-8'));
|
||||||
// maybe the two following lines are useful for caching???
|
// maybe the two following lines are useful for caching???
|
||||||
$config->set('HTML','DefinitionID', 'egroupware');
|
$config->set('HTML','DefinitionID', 'egroupware');
|
||||||
$config->set('HTML','DefinitionRev', 1);
|
$config->set('HTML','DefinitionRev', 1);
|
||||||
@ -1296,7 +1296,7 @@ class html
|
|||||||
'td[class|colspan|rowspan|width|style|align|bgcolor|align|valign|nowrap],'.
|
'td[class|colspan|rowspan|width|style|align|bgcolor|align|valign|nowrap],'.
|
||||||
'th[class|colspan|rowspan|width|style|align|bgcolor|align|valign|nowrap],'.
|
'th[class|colspan|rowspan|width|style|align|bgcolor|align|valign|nowrap],'.
|
||||||
'a[href|target|name|title],img[src|alt|title]');
|
'a[href|target|name|title],img[src|alt|title]');
|
||||||
$config->set('Cache', 'SerializerPath', $GLOBALS['egw_info']['server']['temp_dir']);
|
$config->set('Cache', 'SerializerPath', ($GLOBALS['egw_info']['server']['temp_dir']?$GLOBALS['egw_info']['server']['temp_dir']:sys_get_temp_dir()));
|
||||||
}
|
}
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
// the latter may enable you to modify the config later on, but by now
|
// the latter may enable you to modify the config later on, but by now
|
||||||
|
Loading…
x
Reference in New Issue
Block a user