Do the check in a way that matches correctly for all

This commit is contained in:
Nathan Gray 2012-12-11 15:31:35 +00:00
parent cf5269f6d1
commit c067e2ccb7

View File

@ -1344,8 +1344,8 @@ class html
$font_size = $GLOBALS['egw_info']['user']['preferences']['common']['rte_font_size']; $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 // 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.';">/';//&#8203</span>/'; $regex = '#^<span style="font-family:'.$font.';font-size:'.$font_size.';">.?</span>$#us';
if(strlen($html) == 75 && preg_match($regex,$html)) if(preg_match($regex,$html))
{ {
return ''; return '';
} }