mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Check for empty user font preference span, and remove it so empty checks still work
This commit is contained in:
parent
e29cd447ab
commit
cf5269f6d1
@ -1336,7 +1336,19 @@ class html
|
||||
static function purify($html,$config=null,$spec=array(),$_force=false)
|
||||
{
|
||||
$defaultConfig = array('valid_xhtml'=>1,'safe'=>1);
|
||||
|
||||
if (empty($html)) return $html; // no need to process further
|
||||
|
||||
// User preferences
|
||||
$font = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font'];
|
||||
$font_size = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font_size'];
|
||||
|
||||
// Check for "blank" = just user preference span - for some reason we can't match on the entity, so approximate
|
||||
$regex = '/^<span style="font-family:'.$font.';font-size:'.$font_size.';">/';//​</span>/';
|
||||
if(strlen($html) == 75 && preg_match($regex,$html))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
$htmLawed = new egw_htmLawed();
|
||||
if (is_array($config) && $_force===false) $config = array_merge($defaultConfig, $config);
|
||||
if (empty($config)) $config = $defaultConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user