Slightly more robust checking for "blank" HTML area in case CKEditor adds some styles

This commit is contained in:
nathangray 2018-05-11 15:00:12 -06:00
parent 820d269e71
commit 5ceea5b93e

View File

@ -212,7 +212,7 @@ class HtmLawed
$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>$#us';
$regex = '#^<span style="[^"]*font-family:'.$font.'; font-size:'.$font_size.'pt;[^"]*">.?</span>$#us';
if(preg_match($regex,$html))
{
return '';